user6608138
user6608138

Reputation: 381

Sqoop Error while using any sqoop command

I am using hadoop 2.6.0,now i am trying sqoop-1.4.5.bin__hadoop-2.0.4-alpha.tar.gz.I am getting sqoop version using

sqoop version
2016-10-19 16:11:21,722 [myid:] - INFO  [main:Sqoop@92] - Running Sqoop version: 1.4.5
Sqoop 1.4.5

but if i am trying any sqoop command it's giving the following exception,

sqoop list-tables --connect jdbc:mysql://localhost/test --username root --password hadoop


Exception in thread "main" java.lang.NoSuchMethodError: org.apache.hadoop.conf.Configuration.addDeprecations([Lorg/apache/hadoop/conf/Configuration$DeprecationDelta;)V

I copied mysql connector jar to sqoop/lib also.I am not able to find the cause.anybody have any idea please share me how to solve this.

Upvotes: 1

Views: 903

Answers (5)

Bigboss
Bigboss

Reputation: 21

$ps -ef|grep -i manager

You can find whether node manager working or not

$ps -fu hdfs

It will show whether namenode datanode and secondary namenode working or not

$ps -fu yarn

It will show node manager and resource manager working or not

If all working in the sense sqoop will work..

Upvotes: 1

Suresh Kumar
Suresh Kumar

Reputation: 81

You should globalize sqoop path by adding into bashrc file. Steps given below.

  1. Open terminal

  2. Open. bashrc file

sudo gedit ~/. bashrc

  1. In it add sqoop home dir path as following.

SQOOP_HOME = /absolute/path/of/sqoop

PATH = $PATH:$SQOOP_HOME/bin

  1. Then save it and close it. In terminal type.

bash

  1. Now try to run sqoop command.

Upvotes: 0

  1. sqoop help // this will display all required commands
  2. to display all data bases sqoop list-databases --connect jdbc:mysql://localhost/ --username root --password cloudera
  3. to display all tables sqoop list-tables --connect jdbc:mysql://localhost/databasename --username root --password cloudera

Upvotes: 0

rajat sinha
rajat sinha

Reputation: 1

You need to create a user in MySQL

CREATE USER 'usrname'@'%' IDENTIFIED BY 'password';

GRANT ALL PRIVILEGES ON *.* TO 'usrname'@'%' WITH GRANT OPTION;

Now you can run the query

sqoop list-tables --connect jdbc:mysql://192.168.1.18/mysql  --username 
usrname -P

Upvotes: 0

Aman Saurav
Aman Saurav

Reputation: 826

sqoop list-tables --connect jdbc:mysql://localhost:3306/databasename

This is the correct query for listing all the tables in a particular database, the port number for mysql by default is 3306.

Upvotes: 1

Related Questions