java - error in resolving org.apache.hadoop.conf.Configuration -
java - error in resolving org.apache.hadoop.conf.Configuration -
i want write files hdfs nowadays on remote server , came across few examples this , this. have cdh4.2.1 on remote server , when code seek import org.apache.hadoop.conf.configuration;
, next error:
cannot resolve configuration
my pom.xml looks like:
<dependency> <groupid>org.apache.hadoop</groupid> <artifactid>hadoop-core</artifactid> <version>1.2.1</version> </dependency> <dependency> <groupid>org.apache.hadoop</groupid> <artifactid>hadoop-common</artifactid> <version>2.4.1</version> </dependency>
in this post, pom.xml looks different , when seek set versions
in pom, maven not recognize it.
how can resolve issue?
try using hadoop-client
dependency , utilize cloudera specific version using cdh this:
<dependency> <groupid>org.apache.hadoop</groupid> <artifactid>hadoop-client</artifactid> <version>2.0.0-cdh4.2.1</version> </dependency>
also create sure have next repositories resolve jar dependencies:
<repository> <id>maven-hadoop</id> <name>hadoop releases</name> <url>https://repository.cloudera.com/content/repositories/releases/</url> </repository> <repository> <id>cloudera-repos</id> <name>cloudera repos</name> <url>https://repository.cloudera.com/artifactory/cloudera-repos/</url> </repository>
java apache maven hadoop hdfs
Comments
Post a Comment