Skip to content

Commit

Permalink
Fix comment
Browse files Browse the repository at this point in the history
  • Loading branch information
ravipesala committed Aug 28, 2018
1 parent febd215 commit d402633
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,14 @@ class SparkCarbonFileFormat extends FileFormat
options: Map[String, String],
files: Seq[FileStatus]): Option[StructType] = {
val tablePath = options.get("path") match {
case Some(path) => path
case Some(path) =>
val defaultFsUrl =
sparkSession.sparkContext.hadoopConfiguration.get(CarbonCommonConstants.FS_DEFAULT_FS)
if (defaultFsUrl == null) {
path
} else {
defaultFsUrl + CarbonCommonConstants.FILE_SEPARATOR + path
}
case _ => FileFactory.getUpdatedFilePath(files.head.getPath.getParent.toUri.toString)
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,8 @@ private static class InputProcessorIterator extends CarbonIterator<CarbonRowBatc

private DirectDictionaryGenerator timestampDictionaryGenerator;

private BadRecordLogHolder logHolder = new BadRecordLogHolder();

public InputProcessorIterator(List<CarbonIterator<Object[]>> inputIterators, int batchSize,
boolean preFetch, AtomicLong rowCounter, int[] orderOfData, boolean[] noDictionaryMapping,
DataType[] dataTypes, CarbonDataLoadConfiguration configuration,
Expand Down Expand Up @@ -281,7 +283,6 @@ private CarbonRowBatch getBatch() {

private Object[] convertToNoDictionaryToBytes(Object[] data, DataField[] dataFields) {
Object[] newData = new Object[data.length];
BadRecordLogHolder logHolder = new BadRecordLogHolder();
for (int i = 0; i < data.length; i++) {
if (i < noDictionaryMapping.length && noDictionaryMapping[i]) {
newData[i] = DataTypeUtil
Expand Down

0 comments on commit d402633

Please sign in to comment.