You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@sqoop.apache.org by 呂佳鴻 <ch...@gmail.com> on 2014/12/12 16:52:09 UTC
sqoop 1.99.3 Java api check submission status
hi,
i try the job submission sample (
http://sqoop.apache.org/docs/1.99.3/ClientAPI.html)
System.out.println("Progress : " + String.format("%.2f %%",
submission.getProgress() * 100));
why the submission.getProgress() just turn the value 0 back ? (i put it in
while loop )
how can i that the program wait until it finish the mapreduce job?
thanks!
Re: sqoop 1.99.3 Java api check submission status
Posted by 呂佳鴻 <ch...@gmail.com>.
Thanks Abe! I will try it .
2014-12-24 10:51 GMT+08:00 Abraham Elmahrek <ab...@cloudera.com>:
> Hey man,
>
> Take a look at the following:
> -
> https://github.com/apache/sqoop/blob/branch-1.99.3/client/src/main/java/org/apache/sqoop/client/SubmissionCallback.java
> -
> https://github.com/apache/sqoop/blob/branch-1.99.3/shell/src/main/java/org/apache/sqoop/shell/StartJobFunction.java#L54
>
> -Abe
>
> On Mon, Dec 22, 2014 at 4:41 AM, 呂佳鴻 <ch...@gmail.com> wrote:
>
>> startSubmission
>
>
>
>
Re: sqoop 1.99.3 Java api check submission status
Posted by Abraham Elmahrek <ab...@cloudera.com>.
Hey man,
Take a look at the following:
-
https://github.com/apache/sqoop/blob/branch-1.99.3/client/src/main/java/org/apache/sqoop/client/SubmissionCallback.java
-
https://github.com/apache/sqoop/blob/branch-1.99.3/shell/src/main/java/org/apache/sqoop/shell/StartJobFunction.java#L54
-Abe
On Mon, Dec 22, 2014 at 4:41 AM, 呂佳鴻 <ch...@gmail.com> wrote:
> startSubmission
Re: sqoop 1.99.3 Java api check submission status
Posted by 呂佳鴻 <ch...@gmail.com>.
sorry, the sqoop user mailing-list of my e-mail have some problem . I
can't receive the mail .
how can i use the startSubmission(jid, callback, pollTime) . i want to
use synchronous submission.
I don't know the meaning of callback parameter i should do .
It's there have the sample i can reference?
Thanks
On Sat Dec 13 2014 at 下午8:22:32 呂佳鴻 <ch...@gmail.com> wrote:
> I can run it successfully(from mysql to hdfs) .
> When I use java to submit ,I only can check job status on client shell .
> (can't check job status with java api i mentioned above)
> How can i synchronous submission with java api method ?
> Thanks!
>
> On Sat Dec 13 2014 at 上午10:49:23 Abraham Elmahrek <ab...@cloudera.com>
> wrote:
>
>> It doesn't sound like your mapreduce job is actually progressing. You can
>> wait by running a synchronous submission: 'start job --jid 1 -s'.
>>
>> http://sqoop.apache.org/docs/1.99.3/CommandLineClient.html#
>> start-job-function
>>
>>
>> On Fri, Dec 12, 2014 at 9:52 AM, 呂佳鴻 <ch...@gmail.com> wrote:
>>>
>>> hi,
>>> i try the job submission sample (http://sqoop.apache.org/docs/
>>> 1.99.3/ClientAPI.html)
>>>
>>> System.out.println("Progress : " + String.format("%.2f %%", submission.getProgress() * 100));
>>>
>>> why the submission.getProgress() just turn the value 0 back ? (i put
>>> it in while loop )
>>> how can i that the program wait until it finish the mapreduce job?
>>>
>>> thanks!
>>>
>>
Re: sqoop 1.99.3 Java api check submission status
Posted by 呂佳鴻 <ch...@gmail.com>.
I can run it successfully(from mysql to hdfs) .
When I use java to submit ,I only can check job status on client shell .
(can't check job status with java api i mentioned above)
How can i synchronous submission with java api method ?
Thanks!
On Sat Dec 13 2014 at 上午10:49:23 Abraham Elmahrek <ab...@cloudera.com> wrote:
> It doesn't sound like your mapreduce job is actually progressing. You can
> wait by running a synchronous submission: 'start job --jid 1 -s'.
>
>
> http://sqoop.apache.org/docs/1.99.3/CommandLineClient.html#start-job-function
>
>
> On Fri, Dec 12, 2014 at 9:52 AM, 呂佳鴻 <ch...@gmail.com> wrote:
>>
>> hi,
>> i try the job submission sample (
>> http://sqoop.apache.org/docs/1.99.3/ClientAPI.html)
>>
>> System.out.println("Progress : " + String.format("%.2f %%", submission.getProgress() * 100));
>>
>> why the submission.getProgress() just turn the value 0 back ? (i put it
>> in while loop )
>> how can i that the program wait until it finish the mapreduce job?
>>
>> thanks!
>>
>
Re: sqoop 1.99.3 Java api check submission status
Posted by Abraham Elmahrek <ab...@cloudera.com>.
It doesn't sound like your mapreduce job is actually progressing. You can
wait by running a synchronous submission: 'start job --jid 1 -s'.
http://sqoop.apache.org/docs/1.99.3/CommandLineClient.html#start-job-function
On Fri, Dec 12, 2014 at 9:52 AM, 呂佳鴻 <ch...@gmail.com> wrote:
>
> hi,
> i try the job submission sample (
> http://sqoop.apache.org/docs/1.99.3/ClientAPI.html)
>
> System.out.println("Progress : " + String.format("%.2f %%", submission.getProgress() * 100));
>
> why the submission.getProgress() just turn the value 0 back ? (i put it
> in while loop )
> how can i that the program wait until it finish the mapreduce job?
>
> thanks!
>