Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
.idea
target
bin
classes
*.iml
Original file line number Diff line number Diff line change
Expand Up @@ -40,54 +40,7 @@
import org.apache.hadoop.hive.metastore.PartitionDropOptions;
import org.apache.hadoop.hive.metastore.TableType;
import org.apache.hadoop.hive.metastore.Warehouse;
import org.apache.hadoop.hive.metastore.api.AggrStats;
import org.apache.hadoop.hive.metastore.api.ColumnStatisticsObj;
import org.apache.hadoop.hive.metastore.api.CompactionType;
import org.apache.hadoop.hive.metastore.api.ConfigValSecurityException;
import org.apache.hadoop.hive.metastore.api.CurrentNotificationEventId;
import org.apache.hadoop.hive.metastore.api.DataOperationType;
import org.apache.hadoop.hive.metastore.api.Database;
import org.apache.hadoop.hive.metastore.api.EnvironmentContext;
import org.apache.hadoop.hive.metastore.api.FieldSchema;
import org.apache.hadoop.hive.metastore.api.FireEventRequest;
import org.apache.hadoop.hive.metastore.api.FireEventResponse;
import org.apache.hadoop.hive.metastore.api.ForeignKeysRequest;
import org.apache.hadoop.hive.metastore.api.GetAllFunctionsResponse;
import org.apache.hadoop.hive.metastore.api.GetOpenTxnsInfoResponse;
import org.apache.hadoop.hive.metastore.api.GetRoleGrantsForPrincipalRequest;
import org.apache.hadoop.hive.metastore.api.GetRoleGrantsForPrincipalResponse;
import org.apache.hadoop.hive.metastore.api.HeartbeatTxnRangeResponse;
import org.apache.hadoop.hive.metastore.api.HiveObjectPrivilege;
import org.apache.hadoop.hive.metastore.api.HiveObjectRef;
import org.apache.hadoop.hive.metastore.api.HiveObjectType;
import org.apache.hadoop.hive.metastore.api.Index;
import org.apache.hadoop.hive.metastore.api.InvalidObjectException;
import org.apache.hadoop.hive.metastore.api.InvalidOperationException;
import org.apache.hadoop.hive.metastore.api.InvalidPartitionException;
import org.apache.hadoop.hive.metastore.api.LockRequest;
import org.apache.hadoop.hive.metastore.api.LockResponse;
import org.apache.hadoop.hive.metastore.api.MetaException;
import org.apache.hadoop.hive.metastore.api.MetadataPpdResult;
import org.apache.hadoop.hive.metastore.api.NoSuchLockException;
import org.apache.hadoop.hive.metastore.api.NoSuchObjectException;
import org.apache.hadoop.hive.metastore.api.NoSuchTxnException;
import org.apache.hadoop.hive.metastore.api.NotificationEventResponse;
import org.apache.hadoop.hive.metastore.api.OpenTxnsResponse;
import org.apache.hadoop.hive.metastore.api.PartitionEventType;
import org.apache.hadoop.hive.metastore.api.PrimaryKeysRequest;
import org.apache.hadoop.hive.metastore.api.SQLForeignKey;
import org.apache.hadoop.hive.metastore.api.SQLPrimaryKey;
import org.apache.hadoop.hive.metastore.api.ShowCompactResponse;
import org.apache.hadoop.hive.metastore.api.ShowLocksRequest;
import org.apache.hadoop.hive.metastore.api.ShowLocksResponse;
import org.apache.hadoop.hive.metastore.api.TableMeta;
import org.apache.hadoop.hive.metastore.api.TxnAbortedException;
import org.apache.hadoop.hive.metastore.api.TxnOpenException;
import org.apache.hadoop.hive.metastore.api.UnknownDBException;
import org.apache.hadoop.hive.metastore.api.UnknownPartitionException;
import org.apache.hadoop.hive.metastore.api.UnknownTableException;
import org.apache.hadoop.hive.metastore.api.hive_metastoreConstants;
import org.apache.hadoop.hive.metastore.api.CompactionResponse;
import org.apache.hadoop.hive.metastore.api.*;
import org.apache.hadoop.hive.metastore.partition.spec.PartitionSpecProxy;
import org.apache.log4j.Logger;
import org.apache.thrift.TException;
Expand Down Expand Up @@ -1250,6 +1203,17 @@ public List<String> listPartitionNames(String databaseName, String tableName,
return glueMetastoreClientDelegate.listPartitionNames(databaseName, tableName, values, max);
}

@Override
public PartitionValuesResponse listPartitionValues(PartitionValuesRequest partitionValuesRequest) throws MetaException, TException, NoSuchObjectException {
List<org.apache.hadoop.hive.metastore.api.Partition> partitions = glueMetastoreClientDelegate.getPartitions(partitionValuesRequest.getDbName(), partitionValuesRequest.getTblName(), partitionValuesRequest.getFilter(), partitionValuesRequest.getMaxParts());
List<PartitionValuesRow> partitionRows = new ArrayList<>();
for(org.apache.hadoop.hive.metastore.api.Partition p: partitions) {
partitionRows.add(new PartitionValuesRow(p.getValues()));
}
PartitionValuesResponse response = new PartitionValuesResponse(partitionRows);
return response;
}

@Override
public int getNumPartitionsByFilter(String dbName, String tableName, String filter)
throws MetaException, NoSuchObjectException, TException {
Expand Down
4 changes: 2 additions & 2 deletions aws-glue-datacatalog-spark-client/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,13 @@
<artifactId>aws-glue-datacatalog-spark-client</artifactId>
<dependencies>
<dependency>
<groupId>org.spark-project.hive</groupId>
<groupId>org.apache.hive</groupId>
<artifactId>hive-metastore</artifactId>
<version>${spark-hive.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.spark-project.hive</groupId>
<groupId>org.apache.hive</groupId>
<artifactId>hive-exec</artifactId>
<version>${spark-hive.version}</version>
<scope>provided</scope>
Expand Down
4 changes: 2 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<guava.version>14.0.1</guava.version>
<hive2.version>2.3.3</hive2.version>
<spark-hive.version>1.2.1</spark-hive.version>
<hive2.version>2.3.9</hive2.version>
<spark-hive.version>1.2.3-SNAPSHOT</spark-hive.version>
<aws.sdk.version>1.11.267</aws.sdk.version>
<junit.version>4.11</junit.version>
<mockito.version>1.10.19</mockito.version>
Expand Down
10 changes: 8 additions & 2 deletions shims/spark-hive-shims/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,13 @@

<dependencies>
<dependency>
<groupId>org.spark-project.hive</groupId>
<groupId>org.apache.hive</groupId>
<artifactId>hive-exec</artifactId>
<version>${spark-hive.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.spark-project.hive</groupId>
<groupId>org.apache.hive</groupId>
<artifactId>hive-metastore</artifactId>
<version>${spark-hive.version}</version>
<scope>provided</scope>
Expand All @@ -32,5 +32,11 @@
<artifactId>shims-common</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.apache.hadoop</groupId>
<artifactId>hadoop-common</artifactId>
<version>${hadoop.version}</version>
<scope>provided</scope>
</dependency>
</dependencies>
</project>