public void initializeWriter() throws CarbonDataWriterException {
  initFileCount();
  String carbonDataFileName=carbonTablePath.getCarbonDataFileName(fileCount,carbonDataFileAttributes.getTaskId(),carbonDataFileAttributes.getFactTimeStamp());
  String actualFileNameVal=carbonDataFileName + CarbonCommonConstants.FILE_INPROGRESS_STATUS;
  FileData fileData=new FileData(actualFileNameVal,this.storeLocation);
  fileManager.add(fileData);
  this.fileName=storeLocation + File.separator + carbonDataFileName+ CarbonCommonConstants.FILE_INPROGRESS_STATUS;
  this.fileCount++;
  try {
    fileOutputStream=new FileOutputStream(this.fileName,true);
    this.fileChannel=fileOutputStream.getChannel();
  }
 catch (  FileNotFoundException fileNotFoundException) {
    throw new CarbonDataWriterException("Problem while getting the FileChannel for Leaf File",fileNotFoundException);
  }
}

public void initializeWriter ( ) throws CarbonDataWriterException { initFileCount ( ) ; String carbonDataFileName = carbonTablePath . getCarbonDataFileName ( fileCount , carbonDataFileAttributes . getTaskId ( ) , carbonDataFileAttributes . getFactTimeStamp ( ) ) ; String actualFileNameVal = carbonDataFileName + CarbonCommonConstants . FILE_INPROGRESS_STATUS ; FileData fileData = new FileData ( actualFileNameVal , this . storeLocation ) ; fileManager . add ( fileData ) ; this . fileName = storeLocation + File . separator + carbonDataFileName + CarbonCommonConstants . FILE_INPROGRESS_STATUS ; this . fileCount ++ ; try { fileOutputStream = new FileOutputStream ( this . fileName , true ) ; this . fileChannel = fileOutputStream . getChannel ( ) ; } catch ( FileNotFoundException fileNotFoundException ) { throw new CarbonDataWriterException ( "Problem while getting the FileChannel for Leaf File" , fileNotFoundException ) ; } }
this method will be used to initialize the channel
