You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@hive.apache.org by Matouk IFTISSEN <ma...@ysance.com> on 2013/06/17 15:07:06 UTC

Powershell script and Hive command dfs moveFromLocal dont' work ??

Hello

I meet I real problem when I lanch a powershell  script that execute un
other Hive  sript below (that cut file from local to HDFS (hortonwork on
azure) :

Hive script in file “mon_scipt_hive’’

dfs -moveFromLocal D:\Users\admin\Desktop\rep_depot\sous_rep\
 /test_rep_courant



and Powershell script that lunch Hive script:

.

.

$Hive_Home = "C:\apps\dist\hive-0.9.0\bin\hive"

$script_transfert_local_hdfs = "/k -f C:\path\ mon_scipt_hive.sql ;"



.

.

When I execute Hive script in CLI it works fine but when I call it from
Powershell script : it execute Hive script  and no results (in hive logs or
CLI results)

Any help ….;)

Thanks for your answers ;)

RE: Powershell script and Hive command dfs moveFromLocal dont' work ??

Posted by Matouk IFTISSEN <ma...@ysance.com>.
I have resolved the problem I dont use Hive script I have used hadoop cmd
in powershell script  like this :

.

.

$Hadoop_Home = "C:\apps\dist\hadoop-1.1.0-SNAPSHOT\bin\hadoop"

$script_transfert_local_hdfs = "fs -moveFromLocal
D:\Users\admin\Desktop\rep_depot\fichier_log\ /spir_rep_courant"

.

.

And it works!!

Thank you ;)

*De :* Edward Capriolo [mailto:edlinuxguru@gmail.com]
*Envoyé :* lundi 17 juin 2013 16:05
*À :* user@hive.apache.org
*Objet :* Re: Powershell script and Hive command dfs moveFromLocal dont'
work ??



When your processing gets this complicated hive-thrift is probably better
then she'll scripting.

On Monday, June 17, 2013, Matouk IFTISSEN <ma...@ysance.com>
wrote:
> Hello
>
> I meet I real problem when I lanch a powershell  script that execute un
other Hive  sript below (that cut file from local to HDFS (hortonwork on
azure) :
>
> Hive script in file “mon_scipt_hive’’
>
> dfs -moveFromLocal D:\Users\admin\Desktop\rep_depot\sous_rep\
 /test_rep_courant
>
>
>
> and Powershell script that lunch Hive script:
>
> .
>
> .
>
> $Hive_Home = "C:\apps\dist\hive-0.9.0\bin\hive"
>
> $script_transfert_local_hdfs = "/k -f C:\path\ mon_scipt_hive.sql ;"
>
>
>
> .
>
> .
>
> When I execute Hive script in CLI it works fine but when I call it from
Powershell script : it execute Hive script  and no results (in hive logs or
CLI results)
>
> Any help ….;)
>
> Thanks for your answers ;)
>
>

Re: Powershell script and Hive command dfs moveFromLocal dont' work ??

Posted by Edward Capriolo <ed...@gmail.com>.
When your processing gets this complicated hive-thrift is probably better
then she'll scripting.

On Monday, June 17, 2013, Matouk IFTISSEN <ma...@ysance.com>
wrote:
> Hello
>
> I meet I real problem when I lanch a powershell  script that execute un
other Hive  sript below (that cut file from local to HDFS (hortonwork on
azure) :
>
> Hive script in file “mon_scipt_hive’’
>
> dfs -moveFromLocal D:\Users\admin\Desktop\rep_depot\sous_rep\
 /test_rep_courant
>
>
>
> and Powershell script that lunch Hive script:
>
> .
>
> .
>
> $Hive_Home = "C:\apps\dist\hive-0.9.0\bin\hive"
>
> $script_transfert_local_hdfs = "/k -f C:\path\ mon_scipt_hive.sql ;"
>
>
>
> .
>
> .
>
> When I execute Hive script in CLI it works fine but when I call it from
Powershell script : it execute Hive script  and no results (in hive logs or
CLI results)
>
> Any help ….;)
>
> Thanks for your answers ;)
>
>