1. 编写seq文件产生程序
cat GenSeqFile.java
//package hadoop;
import java.io.IOException;
import java.net.URI;
import java.nio.file.Path;
import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.fs.FileSystem;
import org.apache.hadoop.io.IOUtils;
import org.apache.hadoop.io.IntWritable;
import org.apache.hadoop.io.SequenceFile;
import org.apache.hadoop.io.Text;
public class GenSeqFile {
private static String[] myvalues = {
"hello world",
"bye world",
"hello hadoop",
"bye hadoop"
};
public static void main(String args[]) throws IOException{
String url = "/user/root/in-seqf/seq1";
Configuration conf = new Configuration();
FileSystem