0

Is there any option to write the Hadoop distributed File system files as sequence files using c# code. If so can u suggest me a link or other details

user3797438
  • 405
  • 3
  • 6
  • 24

1 Answers1

0

I have not used C# in my Hadoop work, But we can do this.

In JAVA

  Configuration conf = new Configuration();
    Job job = new Job(conf);
    job.setOutputFormatClass(SequenceFileOutputFormat.class);

This will write the SequenceFile. Similarly in C# there should be like this

  HadoopJobConfiguration myConfig = new HadoopJobConfiguration();

            myConfig.InputPath = "/demo/simple/in";

            myConfig.OutputFolder = "/demo/simple/out";

UPDATED:

 HadoopJobConfiguration myConfig = new HadoopJobConfiguration();

                myConfig.InputPath = "/demo/simple/in";

                myConfig.OutputFolder = "/demo/simple/out";
                myConfig.outputformat  =  // Your needed o/p format 

Hope this will give you an idea

backtrack
  • 7,996
  • 5
  • 52
  • 99
  • thank u for ur reply...I do have that code ..but i want to know whether we can do that in c# – user3797438 Dec 23 '14 at 07:17
  • Did you check that in C#. What have you tried so for then ? – backtrack Dec 23 '14 at 07:18
  • Environment.SetEnvironmentVariable("HADOOP_HOME", @"C:\Hadoop"); Environment.SetEnvironmentVariable("JAVA_HOME", @"C:\Java\jdk1.7.0_51"); var config = new HadoopJobConfiguration(); config.InputPath = "/sample.docx"; config.OutputFolder = "/Count"; Job job = new Job(config); job.setOutputFormatClass(SequenceFileOutputFormat.class); This is my code and it shows Job cannot be resolved...I know some dlls are missing but I dont know where to find that – user3797438 Dec 23 '14 at 07:22
  • But It doesnt shows any functions such as outputformat – user3797438 Dec 23 '14 at 08:30