Skip to content

Instantly share code, notes, and snippets.

View Frechet's full-sized avatar

Victor Borovlev Frechet

  • Russian
View GitHub Profile
@gschmutz
gschmutz / docker-compose.yml
Last active September 13, 2022 15:37
Kafka Broker with Schema Registry, Kafka Connect, Control Center, PostgreSQL, UIs, HDFS, Hue ....
version: '2'
services:
zookeeper:
image: confluentinc/cp-zookeeper:3.3.0
hostname: zookeeper
ports:
- "2181:2181"
environment:
ZOOKEEPER_CLIENT_PORT: 2181
@tjworks
tjworks / gist:31688d7e93f4d563ae1d60fc35a11b76
Last active September 28, 2022 10:36
Maven Shade to create spark worker/driver fatjars
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.example</groupId>
<artifactId>spark-demo</artifactId>
<packaging>jar</packaging>
<version>1.0-SNAPSHOT</version>
<name>spark-demo</name>
<url>http://maven.apache.org</url>
<dependencies>
If you’ve set up Hadoop for development you may be wondering why you can’t read or write files or create MapReduce jobs then you’re probably missing a tiny bit of configuration. For most development systems in pseudo-distributed mode it’s easiest to disable permissions altogether. This means that any user, not just the “hdfs” user, can do anything they want to HDFS so do not do this in production unless you have a very good reason.
If that’s the case and you really want to disable permissions just add this snippet into your hdfs-site.xml file (located in /etc/hadoop-0.20/conf.empty/hdfs-site.xml on Debian Squeeze) in the configuration section:
<property>
<name>dfs.permissions</name>
<value>false</value>
</property>
Then restart Hadoop (su to the “hdfs” user and run bin/stop-all.sh then bin/start-all.sh) and try putting a file again. You should now be able to read/write with no restrictions.