0

我正在尝试使用以下命令将数据从 Oracle 导入 Accumulo。

sqoop import --connect jdbc:oracle:thin:hr/hr1234@bhucloud05.ad.abcsoftware.com:1521 --username hr --password hr1234 --accumulo-user kaar --accumulo-password password --accumulo-instance bhucloud05.ad.abcsoftware.com --accumulo-zookeepers bhucloud05.ad.abcsoftware.com:2181 --table employi --accumulo-table employi  --accumulo-column-family col1 --columns eid,ename,comp --accumulo-row-key eid --accumulo-create-table

But I am getting the below error

find: paths must precede expression: Compression.jar
Usage: find [-H] [-L] [-P] [-Olevel] [-D help|tree|search|stat|rates|opt|exec] [path...] [expression]
15/07/27 11:26:08 INFO sqoop.Sqoop: Running Sqoop version: 1.4.5-cdh5.2.0
15/07/27 11:26:08 WARN tool.BaseSqoopTool: Setting your password on the command-line is insecure. Consider using -P instead.
15/07/27 11:26:08 INFO oracle.OraOopManagerFactory: Data Connector for Oracle and Hadoop is disabled.
15/07/27 11:26:08 INFO manager.SqlManager: Using default fetchSize of 1000
15/07/27 11:26:08 INFO tool.CodeGenTool: Beginning code generation
15/07/27 11:26:09 INFO manager.OracleManager: Time zone has been set to GMT
15/07/27 11:26:09 INFO manager.SqlManager: Executing SQL statement: SELECT t.* FROM employi t WHERE 1=0
15/07/27 11:26:09 INFO orm.CompilationManager: HADOOP_MAPRED_HOME is /hadoop/CDH_5.1.2_Linux_parcel/parcels/CDH/lib/hadoop-mapreduce
Note: /tmp/sqoop-hadoop/compile/c4c0bba34136199e18ce69f0e0ae9428/employi.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
15/07/27 11:26:11 INFO orm.CompilationManager: Writing jar file: /tmp/sqoop-hadoop/compile/c4c0bba34136199e18ce69f0e0ae9428/employi.jar
15/07/27 11:26:11 ERROR tool.ImportTool: Error during import: Accumulo jars are not present in classpath, cannot import to Accumulo!

如果我缺少任何配置,你能帮我吗?

4

2 回答 2

0

错误显示“Accumulo jars 不存在于类路径中,无法导入到 Accumulo!”

尝试添加 Hadoop 类路径的 jdbc jar。export HADOOP_CLASSPATH=$HADOOP_CLASSPATH:(jdbc jar的位置)

于 2015-07-27T13:47:10.970 回答
0

确保您已ACCUMULO_HOME正确设置为环境变量或 Java 系统变量accumulo.home

猜测一下,Accumulo jar 从未添加到分布式缓存中。看起来只有当您不提供安装 Accumulo 的位置或提供的位置不正确时才会发生这种情况。位于 a 的所有 jar 文件${ACCUMULO_HOME}/lib都应自动添加到类路径中。

于 2015-07-28T15:47:13.010 回答