Repository: hive Updated Branches: refs/heads/branch-1.2 8c4ad28f7 -> cef4ce07b
HIVE-8165 : Annotation changes for replication (Sushanth Sowmyan, reviewed by Alan Gates) Project: http://git-wip-us.apache.org/repos/asf/hive/repo Commit: http://git-wip-us.apache.org/repos/asf/hive/commit/cef4ce07 Tree: http://git-wip-us.apache.org/repos/asf/hive/tree/cef4ce07 Diff: http://git-wip-us.apache.org/repos/asf/hive/diff/cef4ce07 Branch: refs/heads/branch-1.2 Commit: cef4ce07b99593f14df6d52465920ed909b4b4be Parents: 8c4ad28 Author: Sushanth Sowmyan <khorg...@gmail.com> Authored: Wed Apr 29 15:46:57 2015 -0700 Committer: Sushanth Sowmyan <khorg...@gmail.com> Committed: Wed Apr 29 15:47:59 2015 -0700 ---------------------------------------------------------------------- .../src/main/java/org/apache/hive/hcatalog/api/HCatClient.java | 5 +++++ .../org/apache/hive/hcatalog/api/repl/ReplicationTask.java | 3 +++ .../org/apache/hadoop/hive/metastore/HiveMetaStoreClient.java | 4 ++++ .../org/apache/hadoop/hive/metastore/IMetaStoreClient.java | 6 ++++++ 4 files changed, 18 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/hive/blob/cef4ce07/hcatalog/webhcat/java-client/src/main/java/org/apache/hive/hcatalog/api/HCatClient.java ---------------------------------------------------------------------- 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..edabbef 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,7 @@ public abstract class HCatClient { * @return an iterator over a list of replication events that can be processed one by one. * @throws HCatException */ + @InterfaceStability.Evolving public abstract Iterator<ReplicationTask> getReplicationTasks( long lastEventId, int maxEvents, String dbName, String tableName) throws HCatException; @@ -530,6 +531,8 @@ public abstract class HCatClient { * the order that the operations were done on the database. * @throws HCatException */ + @InterfaceAudience.LimitedPrivate({"Hive"}) + @InterfaceStability.Evolving public abstract List<HCatNotificationEvent> getNextNotification(long lastEventId, int maxEvents, IMetaStoreClient.NotificationFilter filter) @@ -540,6 +543,8 @@ public abstract class HCatClient { * @return * @throws HCatException */ + @InterfaceAudience.LimitedPrivate({"Hive"}) + @InterfaceStability.Evolving public abstract long getCurrentNotificationEventId() throws HCatException; /** http://git-wip-us.apache.org/repos/asf/hive/blob/cef4ce07/hcatalog/webhcat/java-client/src/main/java/org/apache/hive/hcatalog/api/repl/ReplicationTask.java ---------------------------------------------------------------------- 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..c5a3028 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,8 @@ package org.apache.hive.hcatalog.api.repl; import com.google.common.base.Function; +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 +31,7 @@ import org.apache.hive.hcatalog.messaging.MessageFactory; * 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. */ +@InterfaceStability.Evolving public abstract class ReplicationTask { protected HCatNotificationEvent event; protected StagingDirectoryProvider srcStagingDirProvider = null; http://git-wip-us.apache.org/repos/asf/hive/blob/cef4ce07/metastore/src/java/org/apache/hadoop/hive/metastore/HiveMetaStoreClient.java ---------------------------------------------------------------------- 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.Log; 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 class HiveMetaStoreClient implements IMetaStoreClient { 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 class HiveMetaStoreClient implements IMetaStoreClient { } } + @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); http://git-wip-us.apache.org/repos/asf/hive/blob/cef4ce07/metastore/src/java/org/apache/hadoop/hive/metastore/IMetaStoreClient.java ---------------------------------------------------------------------- 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 @@ package org.apache.hadoop.hive.metastore; 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 @@ public interface IMetaStoreClient { * A filter provided by the client that determines if a given notification event should be * returned. */ + @InterfaceAudience.LimitedPrivate({"HCatalog"}) interface NotificationFilter { /** * Whether a notification event should be accepted @@ -1390,6 +1392,7 @@ public interface IMetaStoreClient { * the order that the operations were done on the database. * @throws TException */ + @InterfaceAudience.LimitedPrivate({"HCatalog"}) NotificationEventResponse getNextNotification(long lastEventId, int maxEvents, NotificationFilter filter) throws TException; @@ -1398,6 +1401,7 @@ public interface IMetaStoreClient { * @return last used id * @throws TException */ + @InterfaceAudience.LimitedPrivate({"HCatalog"}) CurrentNotificationEventId getCurrentNotificationEventId() throws TException; /** @@ -1407,6 +1411,8 @@ public interface IMetaStoreClient { * @return response, type depends on type of request * @throws TException */ + + @InterfaceAudience.LimitedPrivate({"Apache Hive, HCatalog"}) FireEventResponse fireListenerEvent(FireEventRequest request) throws TException; class IncompatibleMetastoreException extends MetaException {