diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md index df8d38fb2445..4a45cf3f1c5a 100644 --- a/.github/pull_request_template.md +++ b/.github/pull_request_template.md @@ -32,7 +32,7 @@ Please clarify why the changes are needed. For instance, ### Does this PR introduce _any_ user-facing change? diff --git a/metastore/src/java/org/apache/hadoop/hive/metastore/HiveClientCache.java b/metastore/src/java/org/apache/hadoop/hive/metastore/HiveClientCache.java index b0d204856579..5fa0150f8f77 100644 --- a/metastore/src/java/org/apache/hadoop/hive/metastore/HiveClientCache.java +++ b/metastore/src/java/org/apache/hadoop/hive/metastore/HiveClientCache.java @@ -200,7 +200,7 @@ private void createShutdownHook() { // Add a shutdown hook for cleanup, if there are elements remaining in the cache which were not cleaned up. // This is the best effort approach. Ignore any error while doing so. Notice that most of the clients // would get cleaned up via either the removalListener or the close() call, only the active clients - // that are in the cache or expired but being used in other threads wont get cleaned. The following code will only + // that are in the cache or expired but being used in other threads won't get cleaned. The following code will only // clean the active cache ones. The ones expired from cache but being hold by other threads are in the mercy // of finalize() being called. Thread cleanupHiveClientShutdownThread = new Thread() { diff --git a/ql/src/java/org/apache/hadoop/hive/ql/debug/Utils.java b/ql/src/java/org/apache/hadoop/hive/ql/debug/Utils.java index 2f34824a7cf5..7a2b183125e7 100644 --- a/ql/src/java/org/apache/hadoop/hive/ql/debug/Utils.java +++ b/ql/src/java/org/apache/hadoop/hive/ql/debug/Utils.java @@ -62,7 +62,7 @@ public class Utils { } /** - * Dumps process heap to a file in temp directoty. + * Dumps process heap to a file in temp directory. * @param args Strings to use to build a file name (dump_arg0_arg1_....). */ public static void dumpHeapToTmp(String... args) { diff --git a/ql/src/java/org/apache/hadoop/hive/ql/metadata/Hive.java b/ql/src/java/org/apache/hadoop/hive/ql/metadata/Hive.java index e4b3bb9eb836..0cb55fe4854f 100644 --- a/ql/src/java/org/apache/hadoop/hive/ql/metadata/Hive.java +++ b/ql/src/java/org/apache/hadoop/hive/ql/metadata/Hive.java @@ -4737,7 +4737,7 @@ private static List convertFromMetastore(Table tbl, return results; } - // This method converts PartitionSpec to Partiton. + // This method converts PartitionSpec to Partition. // This is required because listPartitionsSpecByExpr return set of PartitionSpec but hive // require Partition static List convertFromPartSpec(Iterator iterator, Table tbl) @@ -5074,7 +5074,7 @@ private static void copyFiles(final HiveConf conf, final FileSystem destFs, final String msg = "Unable to move source " + srcP + " to destination " + destf; - // If we do a rename for a non-local file, we will be transfering the original + // If we do a rename for a non-local file, we will be transferring the original // file permissions from source to the destination. Else, in case of mvFile() where we // copy from source to destination, we will inherit the destination's parent group ownership. if (null == pool) { @@ -5533,7 +5533,7 @@ static private HiveException getHiveException(Exception e, String msg, String lo } /** - * If moving across different FileSystems or differnent encryption zone, need to do a File copy instead of rename. + * If moving across different FileSystems or different encryption zone, need to do a File copy instead of rename. * TODO- consider if need to do this for different file authority. * @throws HiveException */ diff --git a/ql/src/java/org/apache/hadoop/hive/ql/metadata/HiveMaterializedViewsRegistry.java b/ql/src/java/org/apache/hadoop/hive/ql/metadata/HiveMaterializedViewsRegistry.java index 2b2368160d0a..7d2acdc82ebc 100644 --- a/ql/src/java/org/apache/hadoop/hive/ql/metadata/HiveMaterializedViewsRegistry.java +++ b/ql/src/java/org/apache/hadoop/hive/ql/metadata/HiveMaterializedViewsRegistry.java @@ -388,7 +388,7 @@ private static RelNode createMaterializedViewScan(HiveConf conf, Table viewTable // 1. Create column schema final RowResolver rr = new RowResolver(); - // 1.1 Add Column info for non partion cols (Object Inspector fields) + // 1.1 Add Column info for non partition cols (Object Inspector fields) StructObjectInspector rowObjectInspector; try { rowObjectInspector = (StructObjectInspector) viewTable.getDeserializer() diff --git a/ql/src/java/org/apache/hadoop/hive/ql/metadata/HiveUtils.java b/ql/src/java/org/apache/hadoop/hive/ql/metadata/HiveUtils.java index 53b3e63b056b..1ceac9a63cb2 100644 --- a/ql/src/java/org/apache/hadoop/hive/ql/metadata/HiveUtils.java +++ b/ql/src/java/org/apache/hadoop/hive/ql/metadata/HiveUtils.java @@ -103,7 +103,7 @@ public static String escapeString(String str) { escape.append('t'); break; default: - // Control characeters! According to JSON RFC u0020 + // Control characters! According to JSON RFC u0020 if (c < ' ') { String hex = Integer.toHexString(c); escape.append('\\'); diff --git a/ql/src/java/org/apache/hadoop/hive/ql/metadata/PartitionIterable.java b/ql/src/java/org/apache/hadoop/hive/ql/metadata/PartitionIterable.java index 5c15c5333866..dd3646c74ceb 100644 --- a/ql/src/java/org/apache/hadoop/hive/ql/metadata/PartitionIterable.java +++ b/ql/src/java/org/apache/hadoop/hive/ql/metadata/PartitionIterable.java @@ -209,7 +209,7 @@ public PartitionIterable(Hive db, GetPartitionsRequest getPartitionsRequest, int partitionNames = db.getPartitionNamesByPartitionVals(table, pVals, (short) -1); break; case BY_EXPR: - // TO-DO: this can be dealt with in a seperate PR. The current changes does not have a particular use case for this. + // TO-DO: this can be dealt with in a separate PR. The current changes does not have a particular use case for this. throw new HiveException("getpartitionsbyexpr is currently unsupported for the getpartitionswithspecs API"); default: throw new HiveException("No such partition filter mode: " + filterMode); diff --git a/ql/src/java/org/apache/hadoop/hive/ql/metadata/PartitionTree.java b/ql/src/java/org/apache/hadoop/hive/ql/metadata/PartitionTree.java index d20a1f5b9663..59b1aef07cc5 100644 --- a/ql/src/java/org/apache/hadoop/hive/ql/metadata/PartitionTree.java +++ b/ql/src/java/org/apache/hadoop/hive/ql/metadata/PartitionTree.java @@ -214,7 +214,7 @@ void alterPartition(List oldPartitionVals, Partition newPartition, boole */ void alterPartitions(List newParts) throws MetaException, InvalidOperationException, NoSuchObjectException { - //altering partitions in a batch must be transactional, therefore bofore starting the altering, clone the original + //altering partitions in a batch must be transactional, therefore before starting the altering, clone the original //partitions map. If something fails, revert it back. Map clonedPartitions = new LinkedHashMap<>(); parts.forEach((key, value) -> clonedPartitions.put(key, new Partition(value))); diff --git a/ql/src/java/org/apache/hadoop/hive/ql/stats/BasicStatsNoJobTask.java b/ql/src/java/org/apache/hadoop/hive/ql/stats/BasicStatsNoJobTask.java index 53b9af9384a1..c6c549d9fa99 100644 --- a/ql/src/java/org/apache/hadoop/hive/ql/stats/BasicStatsNoJobTask.java +++ b/ql/src/java/org/apache/hadoop/hive/ql/stats/BasicStatsNoJobTask.java @@ -460,7 +460,7 @@ private int updatePartitions(Hive db, List scs, Table table) thro ImmutableList values = collectorsByTable.get(partName); if (values == null) { - throw new RuntimeException("very intresting"); + throw new RuntimeException("very interesting"); } if (values.get(0).result instanceof Table) { diff --git a/ql/src/java/org/apache/hadoop/hive/ql/stats/StatsPublisher.java b/ql/src/java/org/apache/hadoop/hive/ql/stats/StatsPublisher.java index 064da47191b2..9cedcdc8f921 100644 --- a/ql/src/java/org/apache/hadoop/hive/ql/stats/StatsPublisher.java +++ b/ql/src/java/org/apache/hadoop/hive/ql/stats/StatsPublisher.java @@ -25,7 +25,7 @@ import java.util.Map; /** - * An interface for any possible implementation for publishing statics. + * An interface for any possible implementation for publishing statistics. */ @InterfaceAudience.Public @InterfaceStability.Stable diff --git a/serde/src/java/org/apache/hadoop/hive/serde2/variant/VariantBuilder.java b/serde/src/java/org/apache/hadoop/hive/serde2/variant/VariantBuilder.java index 5e62810bc4a4..d45808e3095b 100644 --- a/serde/src/java/org/apache/hadoop/hive/serde2/variant/VariantBuilder.java +++ b/serde/src/java/org/apache/hadoop/hive/serde2/variant/VariantBuilder.java @@ -95,7 +95,7 @@ public Variant result() { } // Determine the number of bytes required per offset entry. // The largest offset is the one-past-the-end value, which is total string size. It's very - // unlikely that the number of keys could be larger, but incorporate that into the calcualtion + // unlikely that the number of keys could be larger, but incorporate that into the calculation // in case of pathological data. long maxSize = Math.max(dictionaryStringSize, numKeys); if (maxSize > SIZE_LIMIT) { diff --git a/standalone-metastore/metastore-tools/metastore-benchmarks/README.md b/standalone-metastore/metastore-tools/metastore-benchmarks/README.md index 2b1f10724bd1..ddc2174d2e1d 100644 --- a/standalone-metastore/metastore-tools/metastore-benchmarks/README.md +++ b/standalone-metastore/metastore-tools/metastore-benchmarks/README.md @@ -75,11 +75,11 @@ target directory has two mega-jars which have all the dependencies. ### Using single jar - java -jar hmsbench.jar [test]... + java -jar hmsbench.jar [test]... ### Using hbench on kerberized cluster - java -jar hmsbench.jar -H `hostname` [test]... + java -jar hmsbench.jar -H `hostname` [test]... ### Examples 1. Run all tests with default settings diff --git a/testutils/metastore/metastore-validation-test.sh b/testutils/metastore/metastore-validation-test.sh index 0571f767e79c..e054747446ba 100644 --- a/testutils/metastore/metastore-validation-test.sh +++ b/testutils/metastore/metastore-validation-test.sh @@ -207,7 +207,7 @@ fi FCOUNT=0 -# function to count the number of occurances of a string within another string +# function to count the number of occurrences of a string within another string num_occurances() { fulltext="$1" searchChars="$2" @@ -294,28 +294,28 @@ put() { } # function to retrieve an entry from the map. -# arg1 is name of the map to retrive from. +# arg1 is name of the map to retrieve from. # arg2 is the key for entry get() { grep "^$2=" /tmp/hashmap.$1 | cut -d'=' -f2 } # function that returns the size of the map (aka number if entries) -# arg1 is name of the map to retrive from. +# arg1 is name of the map to retrieve from. size() { echo `cat /tmp/hashmap.$1 | wc -l` } # function that returns the key for the first entry in the map. # maps to the key of the first line in the file on disk. -# arg1 is name of the map to retrive from. +# arg1 is name of the map to retrieve from. firstKey() { head -n 1 /tmp/hashmap.$1 | cut -d'=' -f1 } # function that returns the value of the first entry in the map. # maps to the value of the first line in the file on disk. -# arg1 is name of the map to retrive from. +# arg1 is name of the map to retrieve from. firstValue() { head -n 1 /tmp/hashmap.$1 | cut -d'=' -f2 } @@ -324,7 +324,7 @@ firstValue() { # arg1 is name of the map to retrieve from. # arg2 key to be found in the map. containsKey() { - # find a line that contains the key value at the begining of line. + # find a line that contains the key value at the beginning of line. ret=$(grep "^$2=" /tmp/hashmap.$1 | cut -d'=' -f1) if [[ "$2" = "$ret" ]] then @@ -713,7 +713,7 @@ parse_schema() { done < "$1"; } -# function to detemine if an argument is a number. This is used to determine the +# function to determine if an argument is a number. This is used to determine the # length of the column values that are to be generated. is_int() { return $(test "$@" -eq "$@" > /dev/null 2>&1); @@ -889,7 +889,7 @@ localize_colname() { } # extracts the name of the table from a create statement from the parsed SQL. -# Assumes that the thrid SPACE-separated token is the name of the table. +# Assumes that the third SPACE-separated token is the name of the table. # ex: CREATE TABLE DBS ( DB_ID bigint(20) ); extract_tablename() { if [[ "$DB_SERVER" = "derby" ]] @@ -916,7 +916,7 @@ insert_column_names() { } # extracts the name of the table in its native form from a create statement from the parsed SQL. -# Assumes that the thrid SPACE-separated token is the name of the table. if there are quotes around it will +# Assumes that the third SPACE-separated token is the name of the table. if there are quotes around it will # return the quotes too. # ex: CREATE TABLE DBS ( DB_ID bigint(20) ); extract_raw_tablename() {