无法使用sqoop2将数据从oracle导入accumulo

8ulbf1ek  于 2021-06-02  发布在  Hadoop
关注(0)|答案(2)|浏览(491)

我正在尝试使用下面的命令将数据从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!

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

jmo0nnb3

jmo0nnb31#

确保你有 ACCUMULO_HOME 正确设置为环境变量或java系统变量 accumulo.home .
猜测一下,acumulo jar从未添加到分布式缓存中。看起来只有在您没有提供accumulo的安装位置或提供了不正确的位置时才会发生这种情况。所有jar文件都位于 ${ACCUMULO_HOME}/lib 应自动添加到类路径。

8nuwlpux

8nuwlpux2#

错误显示“accumulo JAR不在类路径中,无法导入到accumulo!”
尝试添加hadoop类路径的jdbcjar。export hadoop\u classpath=$hadoop\u classpath:(jdbcjar的位置)

相关问题