hadoop中的c序列文件格式

k97glaaz  于 2021-05-30  发布在  Hadoop
关注(0)|答案(1)|浏览(308)

有没有选择使用c代码将hadoop分布式文件系统文件编写为序列文件。如果是的话,你能给我建议一个链接或其他细节吗

2hh7jdfx

2hh7jdfx1#

我在hadoop工作中没有使用c,但我们可以做到这一点。
在java中

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

这将写入sequencefile。类似地,在c#中应该有这样的

HadoopJobConfiguration myConfig = new HadoopJobConfiguration();

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

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

更新时间:

HadoopJobConfiguration myConfig = new HadoopJobConfiguration();

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

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

希望这能给你一个主意

相关问题