core/src/main/java/org/apache/carbondata/core/metadata/PartitionMapFileStore.java
/**
   * This method reads the partition file
   *
   * @param partitionMapPath
   * @return
   */
This method reads the partition file
@param partitionMapPath
@return
This method reads the partition file @param partitionMapPath @return
private PartitionMapper readPartitionMap(String partitionMapPath) throws IOException {
    Gson gsonObjectToRead = new Gson();
    DataInputStream dataInputStream = null;
    BufferedReader buffReader = null;
    InputStreamReader inStream = null;
    PartitionMapper partitionMapper;
    AtomicFileOperations fileOperation =
        new AtomicFileOperationsImpl(partitionMapPath, FileFactory.getFileType(partitionMapPath));
    try {
      if (!FileFactory.isFileExist(partitionMapPath, FileFactory.getFileType(partitionMapPath))) {
        return null;
      }
      dataInputStream = fileOperation.openForRead();
      inStream = new InputStreamReader(dataInputStream,
          Charset.forName(CarbonCommonConstants.DEFAULT_CHARSET));
      buffReader = new BufferedReader(inStream);
      partitionMapper = gsonObjectToRead.fromJson(buffReader, PartitionMapper.class);
    } finally {
      if (inStream != null) {
        CarbonUtil.closeStreams(buffReader, inStream, dataInputStream);
      }
    }
    return partitionMapper;
  }
private PartitionMapper readPartitionMap ( String partitionMapPath ) throws IOException { Gson gsonObjectToRead = new Gson ( ) ; DataInputStream dataInputStream = null ; BufferedReader buffReader = null ; InputStreamReader inStream = null ; PartitionMapper partitionMapper ; AtomicFileOperations fileOperation = new AtomicFileOperationsImpl ( partitionMapPath , FileFactory . getFileType ( partitionMapPath ) ) ; try { if ( ! FileFactory . isFileExist ( partitionMapPath , FileFactory . getFileType ( partitionMapPath ) ) ) { return null ; } dataInputStream = fileOperation . openForRead ( ) ; inStream = new InputStreamReader ( dataInputStream , Charset . forName ( CarbonCommonConstants . DEFAULT_CHARSET ) ) ; buffReader = new BufferedReader ( inStream ) ; partitionMapper = gsonObjectToRead . fromJson ( buffReader , PartitionMapper . class ) ; } finally { if ( inStream != null ) { CarbonUtil . closeStreams ( buffReader , inStream , dataInputStream ) ; } } return partitionMapper ; }
This method reads the partition file
 @param partitionMapPath
 @return
This method reads the partition file @param partitionMapPath @return