Home | About | Sematext search-lucene.com search-hadoop.com
NEW: Monitor These Apps!
elasticsearch, apache solr, apache hbase, hadoop, redis, casssandra, amazon cloudwatch, mysql, memcached, apache kafka, apache zookeeper, apache storm, ubuntu, centOS, red hat, debian, puppet labs, java, senseiDB
 Search Hadoop and all its subprojects:

Switch to Plain View
Sqoop >> mail # user >> Java to Sqoop commands


+
Cyril Bogus 2013-03-02, 20:11
+
Jarek Jarcec Cecho 2013-03-02, 20:28
Copy link to this message
-
Re: Java to Sqoop commands
Hi Jarek, thank you for your reply.

The computer On which I run the job is not connected to the internet so all
I can do is describe the output very briefly.

And by the way I am running Sqoop 1.4.2

Following your advice I have done the following

javac Importer.java

java -cp $CLASSPATH Importer

CLASSPATH contains all libraries for sqoop, hive and Hadoop
this is a brief description of the output:
Using Hive Specific Import ....
delimiters with --field-terminated by, etc.
Got error creating database manager: java.io.IOException. No manager for
connect string 'myserver:port/database;user;pass'
Again the classpath contains all the jars AND when I just copy and paste
the same command line that gave me an error in the program as a linux
command everything runs smoothly to the end.

On Sat, Mar 2, 2013 at 3:28 PM, Jarek Jarcec Cecho <[EMAIL PROTECTED]>wrote:

> Hi Cyril,
> when executing Sqoop from within your Java application, do you have all
> the jars (connector, JDBC Driver) in the classpath? Also it would be
> helpful if you could share exactly the error message that you're getting.
>
> Jarcec
>
> On Sat, Mar 02, 2013 at 03:11:40PM -0500, Cyril Bogus wrote:
> > So, I am running a java program to import data from a sqlserver using
> sqoop.
> >
> > I have the Microsoft SQL - Hadoop connector in the lib and whenever I run
> > commands from the command line the import runs fine.
> >
> > Problem is when my Java is the one trying to run the command then sqoop
> > can't find the lib somehow so it does not connect to the DB.
> > I try running the exact same query directly in command line and
> everything
> > works fine.
> >
> > Is there a way where I can define both the driver and connection manager
> > through Java as not to worry about it not finding the proper manager for
> > import?
> >
> > Regards
> >
> > Cyril
>
+
Venkat 2013-03-02, 21:55
+
Jarek Jarcec Cecho 2013-03-04, 16:07
+
Cyril Bogus 2013-03-05, 17:21
+
Jarek Jarcec Cecho 2013-03-06, 19:42
NEW: Monitor These Apps!
elasticsearch, apache solr, apache hbase, hadoop, redis, casssandra, amazon cloudwatch, mysql, memcached, apache kafka, apache zookeeper, apache storm, ubuntu, centOS, red hat, debian, puppet labs, java, senseiDB