Return-Path: Delivered-To: apmail-hadoop-hdfs-user-archive@minotaur.apache.org Received: (qmail 42629 invoked from network); 13 Oct 2010 08:28:29 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 13 Oct 2010 08:28:29 -0000 Received: (qmail 33041 invoked by uid 500); 13 Oct 2010 08:28:29 -0000 Delivered-To: apmail-hadoop-hdfs-user-archive@hadoop.apache.org Received: (qmail 32589 invoked by uid 500); 13 Oct 2010 08:28:26 -0000 Mailing-List: contact hdfs-user-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: hdfs-user@hadoop.apache.org Delivered-To: mailing list hdfs-user@hadoop.apache.org Received: (qmail 32581 invoked by uid 99); 13 Oct 2010 08:28:25 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 13 Oct 2010 08:28:25 +0000 X-ASF-Spam-Status: No, hits=4.4 required=10.0 tests=FREEMAIL_ENVFROM_END_DIGIT,FREEMAIL_FROM,HTML_MESSAGE,RCVD_IN_DNSWL_NONE,SPF_PASS,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of ivytang0812@gmail.com designates 209.85.214.176 as permitted sender) Received: from [209.85.214.176] (HELO mail-iw0-f176.google.com) (209.85.214.176) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 13 Oct 2010 08:28:19 +0000 Received: by iwn3 with SMTP id 3so8392332iwn.35 for ; Wed, 13 Oct 2010 01:27:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:mime-version:received:in-reply-to :references:from:date:message-id:subject:to:content-type; bh=hGVqdRNd89eJCyBqIFSFjHifgcNngpa5LJIx5eUed80=; b=VDtdiS8GDHmWtR9Tyw97/PazwD0pNxo3yb2sHRPRVeifgjoGozi4DQYuW+JjYveOQc rLCpmoMnHv5+mCqQeMJxZO+BCmzFbG9ybxEnq5kxjfm8P1z7dD8oir+ZGtOePVzrEriq tqc47Eb0MlPRHe5U1inkTSHNiOGSHsyHSdecQ= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type; b=ph7i7waD9n8VbJG2oheDUkQKiRGPc6KwFMxbgV47lqEMRU7JPHru1jU0Untt2B30Pn VI+OmJF89pSXPmzfPpJ3KGbUWYK2q7ut7gMzdRrEsWFRbM0OlkBlGaA+VwKK2zHJkd9t tBiTlU8XcaB89wGeQJxBkSFq3EWJcFDrYeWoU= Received: by 10.231.151.135 with SMTP id c7mr6599718ibw.184.1286958478252; Wed, 13 Oct 2010 01:27:58 -0700 (PDT) MIME-Version: 1.0 Received: by 10.231.153.132 with HTTP; Wed, 13 Oct 2010 01:27:38 -0700 (PDT) In-Reply-To: References: From: Ying Tang Date: Wed, 13 Oct 2010 04:27:38 -0400 Message-ID: Subject: Re: question about the thrift python accessing the hdfs To: hdfs-user@hadoop.apache.org Content-Type: multipart/alternative; boundary=0050450144a8efe01f04927b5ebe X-Virus-Checked: Checked by ClamAV on apache.org --0050450144a8efe01f04927b5ebe Content-Type: text/plain; charset=ISO-8859-1 oh,i add the conf in this thrift server's classpath and it works. Thanks dhruba. On Wed, Oct 13, 2010 at 3:49 AM, Ying Tang wrote: > But if i add the conf in thrift server 's classpath .the same exception > will be thrown. > Should i add some special conf property in conf? > > On Wed, Oct 13, 2010 at 3:43 AM, Ying Tang wrote: > >> Oh,yes. >> If i made the pahname='testtxt' , a file named 'testtxt' wil be created in >> the directory of the start server thrift.sh. >> >> On Wed, Oct 13, 2010 at 3:35 AM, Dhruba Borthakur wrote: >> >>> The thrift server needs to pick up the Hadoop configuration from a config >>> directory. This conf directory should be in the CLASSPATH of the thrift >>> server. It appears that ur thrift server is unable to find the right >>> configuration directory and is defaulting to the local file system (as >>> specified by file:///) >>> >>> thanks, >>> dhruba >>> >>> >>> On Wed, Oct 13, 2010 at 12:31 AM, Ying Tang wrote: >>> >>>> i've seen many posts on the internet about this aspect , but i still >>>> don't know how to do . >>>> >>>> I've run the thrift server on hadoop namenode , and then run the python >>>> thrift client. >>>> >>>> i',m trying the create a file in the hdfs , and my pathname.pathname is >>>> 'hdfs://namenode:9000/user/hadoop/test' >>>> >>>> But the server thrift throws the exception: >>>> >>>> java.lang.IllegalArgumentException: Wrong FS: >>>> hdfs://namenode:9000/user/hadoop/test, expected: file:/// >>>> >>>> And change this pathname to 'file:///user/hadoop/test'' also didn't >>>> work. >>>> >>>> Is there any examples of pathname and thrift client implementation? >>>> >>>> >>>> >>>> -- >>>> Best regards, >>>> >>>> Ivy Tang >>>> >>>> >>>> >>>> >>> >>> >>> -- >>> Connect to me at http://www.facebook.com/dhruba >>> >> >> >> >> -- >> Best regards, >> >> Ivy Tang >> >> >> >> > > > -- > Best regards, > > Ivy Tang > > > > -- Best regards, Ivy Tang --0050450144a8efe01f04927b5ebe Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable oh,i add the conf in this thrift server's classpath and it works.
T= hanks dhruba.

On Wed, Oct 13, 2010 at 3:4= 9 AM, Ying Tang <ivytang0812@gmail.com> wrote:
But if i add the conf in thrift server '= ;s classpath .the same exception will be thrown.
Should i add some spec= ial conf property in conf?

On We= d, Oct 13, 2010 at 3:43 AM, Ying Tang <ivytang0812@gmail.com> wrote:
Oh,yes.
If i made the pahname=3D'tes= ttxt' , a file named 'testtxt' wil be created in the directory = of the start server thrift.sh.

On Wed, Oct 13, 20= 10 at 3:35 AM, Dhruba Borthakur <dhruba@gmail.com> wrote:
The thrift server needs to pick up the = Hadoop configuration from a config directory. This conf directory should be= in the CLASSPATH of the thrift server. It appears that ur thrift server is= unable to find the right configuration directory and is defaulting to the = local file system (as specified by file:///)

thanks,
dhruba


On Wed, Oct 13, 2010 a= t 12:31 AM, Ying Tang <ivytang0812@gmail.com> wrote:
i've seen many posts on the internet abo= ut this aspect , but i still don't know how to do .

I've run the thrift server on hadoop namenode , and then run the python= thrift client.

i',m trying the create a file in the hdfs , and my pathname.= pathname is 'hdfs://namenode:9000/user/hadoop/test'

<= /div>
But the server thrift throws the exception:

java.lang.IllegalArgumentException: Wrong FS: hdfs://namenode:900= 0/user/hadoop/test, expected: file:///

And c= hange this pathname to 'file:///user/hadoop/test'' also didn= 9;t work.

Is there any examples of pathname and thrift client imp= lementation?



--
Best regards,

Ivy Tang






--
Connect to me at http://www.facebook.com/dhruba



--
Best regards,

Ivy Tang

<= br>




--
Best r= egards,

Ivy Tang






--
Best regards,

Ivy Tang



--0050450144a8efe01f04927b5ebe--