diff --git a/hoodie-client/src/main/java/com/uber/hoodie/index/bloom/HoodieBloomIndexCheckFunction.java b/hoodie-client/src/main/java/com/uber/hoodie/index/bloom/HoodieBloomIndexCheckFunction.java index 9c2519cb0..0c2ffa6a9 100644 --- a/hoodie-client/src/main/java/com/uber/hoodie/index/bloom/HoodieBloomIndexCheckFunction.java +++ b/hoodie-client/src/main/java/com/uber/hoodie/index/bloom/HoodieBloomIndexCheckFunction.java @@ -38,7 +38,7 @@ import org.apache.spark.api.java.function.Function2; import scala.Tuple2; /** - * Function performing actual checking of RDD parition containing (fileId, hoodieKeys) against the + * Function performing actual checking of RDD partition containing (fileId, hoodieKeys) against the * actual files */ public class HoodieBloomIndexCheckFunction implements @@ -82,9 +82,9 @@ public class HoodieBloomIndexCheckFunction implements @Override public Iterator> call(Integer partition, - Iterator>> fileParitionRecordKeyTripletItr) + Iterator>> filePartitionRecordKeyTripletItr) throws Exception { - return new LazyKeyCheckIterator(fileParitionRecordKeyTripletItr); + return new LazyKeyCheckIterator(filePartitionRecordKeyTripletItr); } class LazyKeyCheckIterator extends @@ -96,15 +96,15 @@ public class HoodieBloomIndexCheckFunction implements private String currentFile; - private String currentParitionPath; + private String currentPartitionPath; LazyKeyCheckIterator( - Iterator>> fileParitionRecordKeyTripletItr) { - super(fileParitionRecordKeyTripletItr); + Iterator>> filePartitionRecordKeyTripletItr) { + super(filePartitionRecordKeyTripletItr); currentFile = null; candidateRecordKeys = new ArrayList<>(); bloomFilter = null; - currentParitionPath = null; + currentPartitionPath = null; } @Override @@ -118,7 +118,7 @@ public class HoodieBloomIndexCheckFunction implements .readBloomFilterFromParquetMetadata(metaClient.getHadoopConf(), filePath); candidateRecordKeys = new ArrayList<>(); currentFile = fileName; - currentParitionPath = partitionPath; + currentPartitionPath = partitionPath; } catch (Exception e) { throw new HoodieIndexException("Error checking candidate keys against file.", e); } @@ -154,7 +154,7 @@ public class HoodieBloomIndexCheckFunction implements } } else { // do the actual checking of file & break out - Path filePath = new Path(basePath + "/" + currentParitionPath + "/" + currentFile); + Path filePath = new Path(basePath + "/" + currentPartitionPath + "/" + currentFile); logger.info( "#1 After bloom filter, the candidate row keys is reduced to " + candidateRecordKeys .size() + " for " + filePath); @@ -178,7 +178,7 @@ public class HoodieBloomIndexCheckFunction implements // handle case, where we ran out of input, close pending work, update return val if (!inputItr.hasNext()) { - Path filePath = new Path(basePath + "/" + currentParitionPath + "/" + currentFile); + Path filePath = new Path(basePath + "/" + currentPartitionPath + "/" + currentFile); logger.info( "#2 After bloom filter, the candidate row keys is reduced to " + candidateRecordKeys .size() + " for " + filePath); diff --git a/hoodie-client/src/test/java/com/uber/hoodie/io/strategy/TestHoodieCompactionStrategy.java b/hoodie-client/src/test/java/com/uber/hoodie/io/strategy/TestHoodieCompactionStrategy.java index b041546cf..e3d96b292 100644 --- a/hoodie-client/src/test/java/com/uber/hoodie/io/strategy/TestHoodieCompactionStrategy.java +++ b/hoodie-client/src/test/java/com/uber/hoodie/io/strategy/TestHoodieCompactionStrategy.java @@ -143,10 +143,10 @@ public class TestHoodieCompactionStrategy { private List createCompactionOperations(HoodieWriteConfig config, Map> sizesMap) { - Map keyToParitionMap = sizesMap.entrySet().stream().map(e -> + Map keyToPartitionMap = sizesMap.entrySet().stream().map(e -> Pair.of(e.getKey(), partitionPaths[new Random().nextInt(partitionPaths.length - 1)])) .collect(Collectors.toMap(Pair::getKey, Pair::getValue)); - return createCompactionOperations(config, sizesMap, keyToParitionMap); + return createCompactionOperations(config, sizesMap, keyToPartitionMap); } private List createCompactionOperations(HoodieWriteConfig config, diff --git a/hoodie-common/src/main/java/com/uber/hoodie/common/model/HoodieRecordLocation.java b/hoodie-common/src/main/java/com/uber/hoodie/common/model/HoodieRecordLocation.java index 51edf4951..04249a9aa 100644 --- a/hoodie-common/src/main/java/com/uber/hoodie/common/model/HoodieRecordLocation.java +++ b/hoodie-common/src/main/java/com/uber/hoodie/common/model/HoodieRecordLocation.java @@ -20,7 +20,7 @@ import com.google.common.base.Objects; import java.io.Serializable; /** - * Location of a HoodieRecord within the parition it belongs to. Ultimately, this points to an + * Location of a HoodieRecord within the partition it belongs to. Ultimately, this points to an * actual file on disk */ public class HoodieRecordLocation implements Serializable { diff --git a/hoodie-hive/src/main/java/com/uber/hoodie/hive/util/SchemaUtil.java b/hoodie-hive/src/main/java/com/uber/hoodie/hive/util/SchemaUtil.java index c410273bd..00337c5b9 100644 --- a/hoodie-hive/src/main/java/com/uber/hoodie/hive/util/SchemaUtil.java +++ b/hoodie-hive/src/main/java/com/uber/hoodie/hive/util/SchemaUtil.java @@ -410,12 +410,12 @@ public class SchemaUtil { .append(getPartitionKeyType(hiveSchema, partitionKey)).toString()); } - String paritionsStr = partitionFields.stream().collect(Collectors.joining(",")); + String partitionsStr = partitionFields.stream().collect(Collectors.joining(",")); StringBuilder sb = new StringBuilder("CREATE EXTERNAL TABLE IF NOT EXISTS "); sb = sb.append(config.databaseName).append(".").append(config.tableName); sb = sb.append("( ").append(columns).append(")"); if (!config.partitionFields.isEmpty()) { - sb = sb.append(" PARTITIONED BY (").append(paritionsStr).append(")"); + sb = sb.append(" PARTITIONED BY (").append(partitionsStr).append(")"); } sb = sb.append(" ROW FORMAT SERDE '").append(serdeClass).append("'"); sb = sb.append(" STORED AS INPUTFORMAT '").append(inputFormatClass).append("'"); diff --git a/hoodie-spark/src/test/scala/DataSourceDefaultsTest.scala b/hoodie-spark/src/test/scala/DataSourceDefaultsTest.scala index e136545da..2abf50c0e 100644 --- a/hoodie-spark/src/test/scala/DataSourceDefaultsTest.scala +++ b/hoodie-spark/src/test/scala/DataSourceDefaultsTest.scala @@ -38,10 +38,10 @@ class DataSourceDefaultsTest extends AssertionsForJUnit { } - private def getKeyConfig(recordKeyFieldName: String, paritionPathField: String): TypedProperties = { + private def getKeyConfig(recordKeyFieldName: String, partitionPathField: String): TypedProperties = { val props = new TypedProperties() props.setProperty(DataSourceWriteOptions.RECORDKEY_FIELD_OPT_KEY, recordKeyFieldName) - props.setProperty(DataSourceWriteOptions.PARTITIONPATH_FIELD_OPT_KEY, paritionPathField) + props.setProperty(DataSourceWriteOptions.PARTITIONPATH_FIELD_OPT_KEY, partitionPathField) props }