static CopyState readCopyState(DataInput in) throws IOException {
  byte[] infosBytes=new byte[in.readVInt()];
  in.readBytes(infosBytes,0,infosBytes.length);
  long gen=in.readVLong();
  long version=in.readVLong();
  Map<String,FileMetaData> files=readFilesMetaData(in);
  int count=in.readVInt();
  Set<String> completedMergeFiles=new HashSet<>();
  for (int i=0; i < count; i++) {
    completedMergeFiles.add(in.readString());
  }
  long primaryGen=in.readVLong();
  return new CopyState(files,version,gen,infosBytes,completedMergeFiles,primaryGen,null);
}

static CopyState readCopyState ( DataInput in ) throws IOException { byte [ ] infosBytes = new byte [ in . readVInt ( ) ] ; in . readBytes ( infosBytes , 0 , infosBytes . length ) ; long gen = in . readVLong ( ) ; long version = in . readVLong ( ) ; Map < String , FileMetaData > files = readFilesMetaData ( in ) ; int count = in . readVInt ( ) ; Set < String > completedMergeFiles = new HashSet < > ( ) ; for ( int i = 0 ; i < count ; i ++ ) { completedMergeFiles . add ( in . readString ( ) ) ; } long primaryGen = in . readVLong ( ) ; return new CopyState ( files , version , gen , infosBytes , completedMergeFiles , primaryGen , null ) ; }
pulls copystate off the wire
