From 986b87749c7a7d26267ebdfb529a9d8f71497e7f Mon Sep 17 00:00:00 2001 From: Sushanth Sowmyan Date: Mon, 27 Apr 2015 23:18:58 -0700 Subject: [PATCH] HIVE-8165 : Annotation changes for replication --- .../src/main/java/org/apache/hive/hcatalog/api/HCatClient.java | 6 ++++++ .../java/org/apache/hive/hcatalog/api/repl/ReplicationTask.java | 5 +++++ .../java/org/apache/hadoop/hive/metastore/HiveMetaStoreClient.java | 4 ++++ .../src/java/org/apache/hadoop/hive/metastore/IMetaStoreClient.java | 6 ++++++ 4 files changed, 21 insertions(+) diff --git a/hcatalog/webhcat/java-client/src/main/java/org/apache/hive/hcatalog/api/HCatClient.java b/hcatalog/webhcat/java-client/src/main/java/org/apache/hive/hcatalog/api/HCatClient.java index e9ccb13..ac0707c 100644 --- a/hcatalog/webhcat/java-client/src/main/java/org/apache/hive/hcatalog/api/HCatClient.java +++ b/hcatalog/webhcat/java-client/src/main/java/org/apache/hive/hcatalog/api/HCatClient.java @@ -514,6 +514,8 @@ public abstract void cancelDelegationToken(String tokenStrForm) * @return an iterator over a list of replication events that can be processed one by one. * @throws HCatException */ + @InterfaceAudience.LimitedPrivate({"Apache Hive, Apache Falcon"}) + @InterfaceStability.Evolving public abstract Iterator getReplicationTasks( long lastEventId, int maxEvents, String dbName, String tableName) throws HCatException; @@ -530,6 +532,8 @@ public abstract void cancelDelegationToken(String tokenStrForm) * the order that the operations were done on the database. * @throws HCatException */ + @InterfaceAudience.LimitedPrivate({"Apache Hive, Apache Falcon"}) + @InterfaceStability.Evolving public abstract List getNextNotification(long lastEventId, int maxEvents, IMetaStoreClient.NotificationFilter filter) @@ -540,6 +544,8 @@ public abstract void cancelDelegationToken(String tokenStrForm) * @return * @throws HCatException */ + @InterfaceAudience.LimitedPrivate({"Apache Hive, Apache Falcon"}) + @InterfaceStability.Evolving public abstract long getCurrentNotificationEventId() throws HCatException; /** diff --git a/hcatalog/webhcat/java-client/src/main/java/org/apache/hive/hcatalog/api/repl/ReplicationTask.java b/hcatalog/webhcat/java-client/src/main/java/org/apache/hive/hcatalog/api/repl/ReplicationTask.java index 47600f7..fd2678e 100644 --- a/hcatalog/webhcat/java-client/src/main/java/org/apache/hive/hcatalog/api/repl/ReplicationTask.java +++ b/hcatalog/webhcat/java-client/src/main/java/org/apache/hive/hcatalog/api/repl/ReplicationTask.java @@ -19,6 +19,9 @@ package org.apache.hive.hcatalog.api.repl; import com.google.common.base.Function; +import org.apache.hadoop.hive.common.classification.InterfaceAudience; +import org.apache.hadoop.hive.common.classification.InterfaceStability; + import org.apache.hadoop.hive.conf.HiveConf; import org.apache.hive.hcatalog.api.HCatClient; import org.apache.hive.hcatalog.api.HCatNotificationEvent; @@ -29,6 +32,8 @@ * ReplicationTask captures the concept of what it'd take to replicate changes from * one warehouse to another given a notification event that captures what changed. */ +@InterfaceAudience.LimitedPrivate({"Apache Hive, Apache Falcon"}) +@InterfaceStability.Evolving public abstract class ReplicationTask { protected HCatNotificationEvent event; protected StagingDirectoryProvider srcStagingDirProvider = null; diff --git a/metastore/src/java/org/apache/hadoop/hive/metastore/HiveMetaStoreClient.java b/metastore/src/java/org/apache/hadoop/hive/metastore/HiveMetaStoreClient.java index afc584a..b3f7859 100644 --- a/metastore/src/java/org/apache/hadoop/hive/metastore/HiveMetaStoreClient.java +++ b/metastore/src/java/org/apache/hadoop/hive/metastore/HiveMetaStoreClient.java @@ -48,6 +48,7 @@ import org.apache.commons.logging.LogFactory; import org.apache.hadoop.hive.common.ObjectPair; import org.apache.hadoop.hive.common.ValidTxnList; +import org.apache.hadoop.hive.common.classification.InterfaceAudience; import org.apache.hadoop.hive.common.classification.InterfaceAudience.Public; import org.apache.hadoop.hive.common.classification.InterfaceStability.Unstable; import org.apache.hadoop.hive.conf.HiveConf; @@ -1919,6 +1920,7 @@ public void addDynamicPartitions(long txnId, String dbName, String tableName, client.add_dynamic_partitions(new AddDynamicPartitions(txnId, dbName, tableName, partNames)); } + @InterfaceAudience.LimitedPrivate({"HCatalog"}) @Override public NotificationEventResponse getNextNotification(long lastEventId, int maxEvents, NotificationFilter filter) throws TException { @@ -1939,11 +1941,13 @@ public NotificationEventResponse getNextNotification(long lastEventId, int maxEv } } + @InterfaceAudience.LimitedPrivate({"HCatalog"}) @Override public CurrentNotificationEventId getCurrentNotificationEventId() throws TException { return client.get_current_notificationEventId(); } + @InterfaceAudience.LimitedPrivate({"Apache Hive, HCatalog"}) @Override public FireEventResponse fireListenerEvent(FireEventRequest rqst) throws TException { return client.fire_listener_event(rqst); diff --git a/metastore/src/java/org/apache/hadoop/hive/metastore/IMetaStoreClient.java b/metastore/src/java/org/apache/hadoop/hive/metastore/IMetaStoreClient.java index 92adad0..129a98d 100644 --- a/metastore/src/java/org/apache/hadoop/hive/metastore/IMetaStoreClient.java +++ b/metastore/src/java/org/apache/hadoop/hive/metastore/IMetaStoreClient.java @@ -20,6 +20,7 @@ import org.apache.hadoop.hive.common.ValidTxnList; +import org.apache.hadoop.hive.common.classification.InterfaceAudience; import org.apache.hadoop.hive.conf.HiveConf; import org.apache.hadoop.hive.metastore.api.AddDynamicPartitions; import org.apache.hadoop.hive.metastore.api.CompactionType; @@ -1369,6 +1370,7 @@ void addDynamicPartitions(long txnId, String dbName, String tableName, List