  public static void writeMapFile(String seqFile) throws IOException {
 
         Path readPath = new Path(seqFile);
         Path mapPath = new Path(readPath, MapFile.DATA_FILE_NAME);
 
         Configuration conf = new Configuration(false);
         FileSystem fs = FileSystem.get(URI.create(seqFile), conf);
 
         SequenceFile.Reader reader = null;
 
         try{
             reader = new SequenceFile.Reader(conf, SequenceFile.Reader.file(mapPath));
             Class keyClass = reader.getKeyClass();
             Class valueClass = reader.getValueClass();
 
             MapFile.fix(fs, readPath, keyClass, valueClass, false, conf);
 
         }
         catch(IOException ioEx){
             ioEx.printStackTrace();
         }
         catch(Exception ex){
             ex.printStackTrace();
         }
         finally{
             if(reader !=  null){
                 reader.close();
             }
         }
 
     }
 
 
