Return-Path: X-Original-To: apmail-hadoop-common-user-archive@www.apache.org Delivered-To: apmail-hadoop-common-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 9C45FDCE9 for ; Tue, 4 Sep 2012 05:49:09 +0000 (UTC) Received: (qmail 84681 invoked by uid 500); 4 Sep 2012 05:49:05 -0000 Delivered-To: apmail-hadoop-common-user-archive@hadoop.apache.org Received: (qmail 83877 invoked by uid 500); 4 Sep 2012 05:48:58 -0000 Mailing-List: contact user-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@hadoop.apache.org Delivered-To: mailing list user@hadoop.apache.org Received: (qmail 83841 invoked by uid 99); 4 Sep 2012 05:48:56 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 04 Sep 2012 05:48:56 +0000 X-ASF-Spam-Status: No, hits=-0.1 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_MED,SPF_PASS,UNPARSEABLE_RELAY X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of Shobha.Mahadevappa@nttdata.com designates 216.82.250.242 as permitted sender) Received: from [216.82.250.242] (HELO mail1.bemta12.messagelabs.com) (216.82.250.242) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 04 Sep 2012 05:48:50 +0000 Received: from [216.82.249.212:35085] by server-11.bemta-12.messagelabs.com id 78/A1-24674-C2695405; Tue, 04 Sep 2012 05:48:28 +0000 X-Env-Sender: Shobha.Mahadevappa@nttdata.com X-Msg-Ref: server-6.tower-219.messagelabs.com!1346737705!1113634!1 X-Originating-IP: [202.165.62.77] X-StarScan-Received: X-StarScan-Version: 6.6.1.3; banners=nttdata.com,-,- X-VirusChecked: Checked Received: (qmail 23461 invoked from network); 4 Sep 2012 05:48:28 -0000 Received: from unknown (HELO MSG710.KDS.KEANE.COM) (202.165.62.77) by server-6.tower-219.messagelabs.com with AES128-SHA encrypted SMTP; 4 Sep 2012 05:48:28 -0000 Received: from MAIL706.KDS.KEANE.COM ([fe80::28b5:d068:fb7e:b68a]) by MSG710.KDS.KEANE.COM ([fe80::3421:f6af:7628:f0b0%13]) with mapi id 14.02.0283.003; Tue, 4 Sep 2012 11:18:24 +0530 From: "Mahadevappa, Shobha" To: "user@hadoop.apache.org" Subject: RE: Integrating hadoop with java UI application deployed on tomcat Thread-Topic: Integrating hadoop with java UI application deployed on tomcat Thread-Index: AQHNib9UP7UQWBX1/0KwCgaN1fxRuJd5rZ6w Date: Tue, 4 Sep 2012 05:48:24 +0000 Message-ID: References: In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.248.21.93] Content-Type: multipart/alternative; boundary="_000_FA7084580E844149BC374708CD5D08A12EFA5C47MAIL706KDSKEANE_" MIME-Version: 1.0 X-Virus-Checked: Checked by ClamAV on apache.org --_000_FA7084580E844149BC374708CD5D08A12EFA5C47MAIL706KDSKEANE_ Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Hi, Try adding the hadoop/conf directory in the TOMCAT's classpath Ex : CLASSPATH=3D/usr/local/Apps/hbase-0.90.4/conf:/usr/local/Apps/hadoop-= 0.20.203.0/conf: Regards, Shobha M From: Visioner Sadak [mailto:visioner.sadak@gmail.com] Sent: 03 September 2012 PM 04:01 To: user@hadoop.apache.org Subject: Re: Integrating hadoop with java UI application deployed on tomca= t Thanks steve thers nothing in logs and no exceptions as well i found that = some file is created in my F:\user with directory name but its not visible= inside my hadoop browse filesystem directories i also added the config by= using the below method hadoopConf.addResource( "F:/hadoop-0.22.0/conf/core-site.xml"); when running thru WAR printing out the filesystem i m getting org.apache.h= adoop.fs.LocalFileSystem@9cd8db when running an independet jar within hadoop i m getting DFS[DFSClient[cli= entName=3DDFSClient_296231340, ugi=3Ddell]] when running an independet jar i m able to do uploads.... just wanted to know will i have to add something in my classpath of tomcat= or is there any other configurations of core-site.xml that i am missing o= ut..thanks for your help..... On Sat, Sep 1, 2012 at 1:38 PM, Steve Loughran > wrote: well, it's worked for me in the past outside Hadoop itself: http://smartfrog.svn.sourceforge.net/viewvc/smartfrog/trunk/core/hadoop-co= mponents/hadoop-ops/src/org/smartfrog/services/hadoop/operations/utils/Dfs= Utils.java?revision=3D8882&view=3Dmarkup 1. Turn logging up to DEBUG 2. Make sure that the filesystem you've just loaded is what you expect,= by logging its value. It may turn out to be file:///, because= the normal Hadoop site-config.xml isn't being picked up On Fri, Aug 31, 2012 at 1:08 AM, Visioner Sadak > wrote: but the problem is that my code gets executed with the warning but file i= s not copied to hdfs , actually i m trying to copy a file from local to hd= fs Configuration hadoopConf=3Dnew Configuration(); //get the default associated file system FileSystem fileSystem=3DFileSystem.get(hadoopConf); // HarFileSystem harFileSystem=3D new HarFileSystem(fileSystem); //copy from lfs to hdfs fileSystem.copyFromLocalFile(new Path("E:/test/GANI.jpg"),new Path(= "/user/TestDir/")); ______________________________________________________________________ Disclaimer:This email and any attachments are sent in strictest confidence= for the sole use of the addressee and may contain legally privileged, con= fidential, and proprietary data. If you are not the intended recipient, p= lease advise the sender by replying promptly to this email and then delete= and destroy this email and any attachments without any further use, copyi= ng or forwarding --_000_FA7084580E844149BC374708CD5D08A12EFA5C47MAIL706KDSKEANE_ Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable

Hi,

Try adding the hadoop/c= onf directory in the TOMCAT’s classpath

 

Ex : CLASSPATH=3D/usr/l= ocal/Apps/hbase-0.90.4/conf:/usr/local/Apps/hadoop-0.20.203.0/conf:

 

 

 

Regards,

Shobha = M

=

 

From: Visioner Sadak [mailto:visioner.sadak@gmail.com]
Sent: 03 September 2012 PM 04:01
To: user@hadoop.apache.org
Subject: Re: Integrating hadoop with java UI application deployed o= n tomcat

 

Thanks steve thers nothing in logs and no exception= s as well i found that some file is created in my F:\user with directory n= ame but its not visible inside my hadoop browse filesystem directories i a= lso added the config by using the below method

hadoopConf.addResource(

"F:/hadoop-0.22.= 0/conf/core-site.xml");

when running thru WAR printing out the filesystem i= m getting org.apache.= hadoop.fs.LocalFileSystem@9cd8db 

when running an independet jar within hadoop i m ge= tting DFS[DFSClient[clientName=3DDFSClient_296231340, ugi=3Ddell]]

when running an independet jar i m able to do uploa= ds....

 

just wanted to know will i have to add something in= my classpath of tomcat or is there any other configurations of core-site.xml that i am missing out..thanks = for your help.....

 

 

On Sat, Sep 1, 2012 at 1:38 PM, Steve Loughran <= stevel@hortonw= orks.com> wrote:

 

well, it's worked for me in the past outside Hadoop= itself:

 

 

  1. Turn logging up to DEBUG
  2. Make sure that the filesystem you've just loaded is what you expect, by lo= gging its value. It may turn out to be file:///, because the normal Hadoop site-config= .xml isn't being picked up

 

 

On Fri, Aug 31, 2012 at 1:08 AM, Visioner Sadak <= ;visioner.sa= dak@gmail.com> wrote:

but the problem is that my  code gets executed= with the warning but file is not copied to hdfs , actually i m trying to = copy a file from local to hdfs

 

   Configuration hadoopConf=3Dnew Configu= ration();
        //get the default associated fi= le system
       FileSystem fileSystem=3DFileSystem.ge= t(hadoopConf);       
       // HarFileSystem harFileSystem=3D new= HarFileSystem(fileSystem);
        //copy from lfs to hdfs
       fileSystem.copyFromLocalFile(new Path= ("E:/test/GANI.jpg"),new Path("/user/TestDir/"));

 

 

 


______________________________________________________________________
= Disclaimer:This email and any attachments are sent in strictest confidence= for the sole use of the addressee and may contain legally privileged, con= fidential, and proprietary data. If you are not the intended recipient, p= lease advise the sender by replying promptly to this email and then delete= and destroy this email and any attachments without any further use, copyi= ng or forwarding
--_000_FA7084580E844149BC374708CD5D08A12EFA5C47MAIL706KDSKEANE_--