Results 1 to 4 of 4

Thread: Remote Hadoop Node

  1. #1
    Join Date
    Aug 2010
    Posts
    26

    Default Remote Hadoop Node

    Hi all,

    Does Spring-Hadoop support configuration for a remote hadoop server? I really should have checked this before spending a day setting it up.

    Code:
    <hdp:configuration>
            fs.default.name=hdfs://foo.com:9000
         </hdp:configuration>
    I keep getting permission errors as if it is trying to always use a local hadoop instance.

    Caused by: java.io.IOException: Failed to set permissions of path: \tmp\hadoop-foo\mapred\staging\foo\.staging to 0700

    My spring dev box is a windows machine.

    Regards

  2. #2
    Join Date
    Aug 2010
    Posts
    26

    Default

    After further investigation it seems to be a possible bug in the latest release that has returned from an earlier version. So far the only solution is to rebuild after killing out the exception thrown from FileUtils.

    Cygwin does not help in this case as 700 is not valid as far as windows is concerned.

    Some tips for my windows friends. To do the rebuild you can delete all the exec calls that fail. you will still get a working hadoop-core at the end of it.

    Jackson is needed by different dependencies with method and classes that dont exist in differing versions. I tried many from 1.1.0 to 1.9.5 and the only one I found that worked is 1.4.0

    This worked for me as a HelloWorld/HelloNietzsche-chapter-1

    Code:
    <hdp:configuration >
            fs.default.name=hdfs://foo:9000
            dfs.permissions=false
            hadoop.tmp.dir=c:/input
         </hdp:configuration>
         
         
    	<bean id="runner" class="org.springframework.data.hadoop.mapreduce.JobRunner" p:jobs-ref="job"/>
    		
    		<hdp:job validate-paths="false" id="job" 
      input-path="/tmp/hadoop-root/mapred/system/input" output-path="/tmp/hadoop-root/mapred/system/output6"
      mapper="org.apache.hadoop.examples.WordCount.TokenizerMapper"
      reducer="org.apache.hadoop.examples.WordCount.IntSumReducer"/>
    Last edited by msduk; Mar 15th, 2012 at 06:05 PM.

  3. #3
    Join Date
    Jan 2005
    Location
    Bucharest, Romania
    Posts
    5,403

    Default

    Thanks for reporting your findings. Hadoop 1.0.0 doesn't play well with windows (in fact, versions 0.20.203 and upwards I think). as you pointed out this has to do with the fact that some permissions can be set for the staging repo which causes Hadoop to complain.
    In our test suite (and the sample test), we use a little trick by changing the default permissions - take a look at the tests and notice the line called during the constructor.
    Costin Leau
    SpringSource - http://www.SpringSource.com- Spring Training, Consulting, and Support - "From the Source"
    http://twitter.com/costinl
    Please use [ c o d e ] [ / c o d e ] tags

  4. #4
    Join Date
    Feb 2012
    Posts
    6

    Default

    Hi,
    I've encountered the same permissions issue.
    I tried calling PermissionUtils.hackHadoopStagingOnWin(), but it doesn't help.
    Any other suggestion?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •