Home | About | Sematext search-lucene.com search-hadoop.com
 Search Hadoop and all its subprojects:

Switch to Threaded View
Hive >> mail # user >> Variable resolution Fails


Copy link to this message
-
Re: Variable resolution Fails
*Could not synchronize with target -- * this is for when jps could not
connect to application waiting for direct attach
this is fixed in sun jdk 1.6 update 7. you may want to check which version
of jdk you are using

it is not required to format the namenode again and again. When you format
the namenode it loses all the meta data eventually meaning loss of all the
data.
Still if you want to reformat then
*Re-format filesystem in /home/naidu/dfs/namenode ? (Y or N) y*
its asking for capital letter Y anything else will be considered a No
*
*
On Wed, May 1, 2013 at 1:23 PM, Naidu MS <[EMAIL PROTECTED]>wrote:

> Hi i have two questions regarding hdfs and jps utility
>
> I am new to Hadoop and started leraning hadoop from the past week
>
> 1.when ever i start start-all.sh and jps in console it showing the
> processes started
>
> *naidu@naidu:~/work/hadoop-1.0.4/bin$ jps*
> *22283 NameNode*
> *23516 TaskTracker*
> *26711 Jps*
> *22541 DataNode*
> *23255 JobTracker*
> *22813 SecondaryNameNode*
> *Could not synchronize with target*
>
> But along with the list of process stared it always showing *" Could not
> synchronize with target" *in the jps output. What is meant by "Could not
> synchronize with target"?  Can some one explain why this is happening?
>
>
> 2.Is it possible to format namenode multiple  times? When i enter the
>  namenode -format command, it not formatting the name node and showing the
> following ouput.
>
> *naidu@naidu:~/work/hadoop-1.0.4/bin$ hadoop namenode -format*
> *Warning: $HADOOP_HOME is deprecated.*
> *
> *
> *13/05/01 12:08:04 INFO namenode.NameNode: STARTUP_MSG: *
> */*************************************************************
> *STARTUP_MSG: Starting NameNode*
> *STARTUP_MSG:   host = naidu/127.0.0.1*
> *STARTUP_MSG:   args = [-format]*
> *STARTUP_MSG:   version = 1.0.4*
> *STARTUP_MSG:   build > https://svn.apache.org/repos/asf/hadoop/common/branches/branch-1.0 -r
> 1393290; compiled by 'hortonfo' on Wed Oct  3 05:13:58 UTC 2012*
> *************************************************************/*
> *Re-format filesystem in /home/naidu/dfs/namenode ? (Y or N) y*
> *Format aborted in /home/naidu/dfs/namenode*
> *13/05/01 12:08:05 INFO namenode.NameNode: SHUTDOWN_MSG: *
> */*************************************************************
> *SHUTDOWN_MSG: Shutting down NameNode at naidu/127.0.0.1*
> *
> *
> *************************************************************/*
>
> Can someone help me in understanding this? Why is it not possible to
> format name node multiple times?
>
>
> On Wed, May 1, 2013 at 8:14 AM, Sanjay Subramanian <
> [EMAIL PROTECTED]> wrote:
>
>>  +1  agreed
>>
>>  Also as a general script programming practice I check if the variables
>> I am going to use are NON empty before using them…nothing related to Hive
>> scripts
>>
>>  If [ ${freq} == "" ]
>> then
>>    echo "variable freq is empty…exiting"
>>    exit 1
>> Fi
>>
>>
>>
>>   From: Anthony Urso <[EMAIL PROTECTED]>
>> Reply-To: "[EMAIL PROTECTED]" <[EMAIL PROTECTED]>
>> Date: Tuesday, April 30, 2013 7:20 PM
>> To: "[EMAIL PROTECTED]" <[EMAIL PROTECTED]>, sumit ghosh <
>> [EMAIL PROTECTED]>
>> Subject: Re: Variable resolution Fails
>>
>>   Your shell is expanding the variable ${env:freq}, which doesn't exist
>> in the shell's environment, so hive is getting the empty string in that
>> place.  If you are always intending to run your query like this, just use
>> ${freq} which will be expanded as expected by bash and then passed to hive.
>>
>> Cheers,
>> Anthony
>>
>>
>> On Tue, Apr 30, 2013 at 4:40 PM, sumit ghosh <[EMAIL PROTECTED]> wrote:
>>
>>>  Hi,
>>>
>>> The following variable *freq* fails to resolve:
>>>
>>>   bash-4.1$ export freq=MNTH
>>> bash-4.1$ echo $freq
>>> MNTH
>>> bash-4.1$ hive -e "select ${env:freq} as dr  from dual"
>>> Logging initialized using configuration in
>>> file:/etc/hive/conf.dist/hive-log4j.properties
>>> Hive history
>>> file=/hadoop1/hive_querylog/sumighos/hive_job_log_sumighos_201304302321_1867815625.txt
Nitin Pawar