You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hive.apache.org by ga...@apache.org on 2017/11/02 16:23:11 UTC
[09/12] hive git commit: HIVE-17812 Move remaining classes that
HiveMetaStore depends on. This closes #261. (Alan Gates,
reviewed by Vihang Karajgaonkar)
http://git-wip-us.apache.org/repos/asf/hive/blob/c5a9673a/metastore/src/java/org/apache/hadoop/hive/metastore/events/EventCleanerTask.java
----------------------------------------------------------------------
diff --git a/metastore/src/java/org/apache/hadoop/hive/metastore/events/EventCleanerTask.java b/metastore/src/java/org/apache/hadoop/hive/metastore/events/EventCleanerTask.java
deleted file mode 100644
index 7f99f18..0000000
--- a/metastore/src/java/org/apache/hadoop/hive/metastore/events/EventCleanerTask.java
+++ /dev/null
@@ -1,52 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.hadoop.hive.metastore.events;
-
-import java.util.TimerTask;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.apache.hadoop.hive.metastore.HiveMetaStore.HMSHandler;
-import org.apache.hadoop.hive.metastore.RawStore;
-
-public class EventCleanerTask extends TimerTask{
-
- public static final Logger LOG = LoggerFactory.getLogger(EventCleanerTask.class);
- private final HMSHandler handler;
-
- public EventCleanerTask(HMSHandler handler) {
- super();
- this.handler = handler;
- }
-
- @Override
- public void run() {
-
- try {
- RawStore ms = handler.getMS();
- long deleteCnt = ms.cleanupEvents();
-
- if (deleteCnt > 0L){
- LOG.info("Number of events deleted from event Table: "+deleteCnt);
- }
- } catch (Exception e) {
- LOG.error("Exception while trying to delete events ", e);
- }
- }
-}
http://git-wip-us.apache.org/repos/asf/hive/blob/c5a9673a/metastore/src/java/org/apache/hadoop/hive/metastore/events/InsertEvent.java
----------------------------------------------------------------------
diff --git a/metastore/src/java/org/apache/hadoop/hive/metastore/events/InsertEvent.java b/metastore/src/java/org/apache/hadoop/hive/metastore/events/InsertEvent.java
deleted file mode 100644
index d451122..0000000
--- a/metastore/src/java/org/apache/hadoop/hive/metastore/events/InsertEvent.java
+++ /dev/null
@@ -1,114 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.hadoop.hive.metastore.events;
-
-import org.apache.hadoop.hive.common.classification.InterfaceAudience;
-import org.apache.hadoop.hive.common.classification.InterfaceStability;
-import org.apache.hadoop.hive.metastore.HiveMetaStoreClient;
-import org.apache.hadoop.hive.metastore.api.GetTableRequest;
-import org.apache.hadoop.hive.metastore.HiveMetaStore.HMSHandler;
-import org.apache.hadoop.hive.metastore.api.InsertEventRequestData;
-import org.apache.hadoop.hive.metastore.api.MetaException;
-import org.apache.hadoop.hive.metastore.api.NoSuchObjectException;
-import org.apache.hadoop.hive.metastore.api.Partition;
-import org.apache.hadoop.hive.metastore.api.Table;
-
-import java.util.ArrayList;
-import java.util.List;
-
-@InterfaceAudience.Public
-@InterfaceStability.Stable
-public class InsertEvent extends ListenerEvent {
-
- private final Table tableObj;
- private final Partition ptnObj;
- private final boolean replace;
- private final List<String> files;
- private List<String> fileChecksums = new ArrayList<String>();
-
- /**
- *
- * @param db name of the database the table is in
- * @param table name of the table being inserted into
- * @param partVals list of partition values, can be null
- * @param insertData the inserted files and their checksums
- * @param status status of insert, true = success, false = failure
- * @param handler handler that is firing the event
- */
- public InsertEvent(String db, String table, List<String> partVals,
- InsertEventRequestData insertData, boolean status, HMSHandler handler) throws MetaException,
- NoSuchObjectException {
- super(status, handler);
-
- GetTableRequest req = new GetTableRequest(db, table);
- req.setCapabilities(HiveMetaStoreClient.TEST_VERSION);
- this.tableObj = handler.get_table_req(req).getTable();
- if (partVals != null) {
- this.ptnObj = handler.get_partition(db, table, partVals);
- } else {
- this.ptnObj = null;
- }
-
- // If replace flag is not set by caller, then by default set it to true to maintain backward compatibility
- this.replace = (insertData.isSetReplace() ? insertData.isReplace() : true);
- this.files = insertData.getFilesAdded();
- if (insertData.isSetFilesAddedChecksum()) {
- fileChecksums = insertData.getFilesAddedChecksum();
- }
- }
-
- /**
- * @return Table object
- */
- public Table getTableObj() {
- return tableObj;
- }
-
- /**
- * @return Partition object
- */
- public Partition getPartitionObj() {
- return ptnObj;
- }
-
- /**
- * @return The replace flag.
- */
- public boolean isReplace() {
- return replace;
- }
-
- /**
- * Get list of files created as a result of this DML operation
- *
- * @return list of new files
- */
- public List<String> getFiles() {
- return files;
- }
-
- /**
- * Get a list of file checksums corresponding to the files created (if available)
- *
- * @return
- */
- public List<String> getFileChecksums() {
- return fileChecksums;
- }
-}
http://git-wip-us.apache.org/repos/asf/hive/blob/c5a9673a/metastore/src/java/org/apache/hadoop/hive/metastore/events/ListenerEvent.java
----------------------------------------------------------------------
diff --git a/metastore/src/java/org/apache/hadoop/hive/metastore/events/ListenerEvent.java b/metastore/src/java/org/apache/hadoop/hive/metastore/events/ListenerEvent.java
deleted file mode 100644
index cd66f10..0000000
--- a/metastore/src/java/org/apache/hadoop/hive/metastore/events/ListenerEvent.java
+++ /dev/null
@@ -1,178 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.hadoop.hive.metastore.events;
-
-import org.apache.hadoop.hive.common.classification.InterfaceAudience;
-import org.apache.hadoop.hive.common.classification.InterfaceStability;
-import org.apache.hadoop.hive.metastore.HiveMetaStore.HMSHandler;
-import org.apache.hadoop.hive.metastore.api.EnvironmentContext;
-
-import javax.annotation.concurrent.NotThreadSafe;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.Map;
-
-/**
- * Base class for all the events which are defined for metastore.
- *
- * This class is not thread-safe and not expected to be called in parallel.
- */
-@InterfaceAudience.Public
-@InterfaceStability.Stable
-@NotThreadSafe
-public abstract class ListenerEvent {
-
- /**
- * status of the event, whether event was successful or not.
- */
- private final boolean status;
- private final HMSHandler handler;
-
- /**
- * Key/value parameters used by listeners to store notifications results
- * i.e. DbNotificationListener sets a DB_NOTIFICATION_EVENT_ID.
- *
- * NotThreadSafe: The parameters map is not expected to be access in parallel by Hive, so keep it thread-unsafe
- * to avoid locking overhead.
- */
- private Map<String, String> parameters;
-
- /** For performance concerns, it is preferable to cache the unmodifiable parameters variable that will be returned on the
- * {@link #getParameters()} method. It is expected that {@link #putParameter(String, String)} is called less times
- * than {@link #getParameters()}, so performance may be better by using this cache.
- */
- private Map<String, String> unmodifiableParameters;
-
- // Listener parameters aren't expected to have many values. So far only
- // DbNotificationListener will add a parameter; let's set a low initial capacity for now.
- // If we find out many parameters are added, then we can adjust or remove this initial capacity.
- private static final int PARAMETERS_INITIAL_CAPACITY = 1;
-
- // Properties passed by the client, to be used in execution hooks.
- private EnvironmentContext environmentContext = null;
-
- public ListenerEvent(boolean status, HMSHandler handler) {
- super();
- this.status = status;
- this.handler = handler;
- this.parameters = new HashMap<>(PARAMETERS_INITIAL_CAPACITY);
- updateUnmodifiableParameters();
- }
-
- /**
- * @return the status of event.
- */
- public boolean getStatus() {
- return status;
- }
-
- /**
- * Set the environment context of the event.
- *
- * @param environmentContext An EnvironmentContext object that contains environment parameters sent from
- * the HMS client.
- */
- public void setEnvironmentContext(EnvironmentContext environmentContext) {
- this.environmentContext = environmentContext;
- }
-
- /**
- * @return environment properties of the event
- */
- public EnvironmentContext getEnvironmentContext() {
- return environmentContext;
- }
-
- /**
- * @return the handler
- */
- public HMSHandler getHandler() {
- return handler;
- }
-
- /**
- * Return all parameters of the listener event. Parameters are read-only (unmodifiable map). If a new parameter
- * must be added, please use the putParameter() method.
- *
- *
- * @return A map object with all parameters.
- */
- public final Map<String, String> getParameters() {
- return unmodifiableParameters;
- }
-
- /**
- * Put a new parameter to the listener event.
- *
- * Overridden parameters is not allowed, and an exception may be thrown to avoid a mis-configuration
- * between listeners setting the same parameters.
- *
- * @param name Name of the parameter.
- * @param value Value of the parameter.
- * @throws IllegalStateException if a parameter already exists.
- */
- public void putParameter(String name, String value) {
- putParameterIfAbsent(name, value);
- updateUnmodifiableParameters();
- }
-
- /**
- * Put a new set the parameters to the listener event.
- *
- * Overridden parameters is not allowed, and an exception may be thrown to avoid a mis-configuration
- * between listeners setting the same parameters.
- *
- * @param parameters A Map object with the a set of parameters.
- * @throws IllegalStateException if a parameter already exists.
- */
- public void putParameters(final Map<String, String> parameters) {
- if (parameters != null) {
- for (Map.Entry<String, String> entry : parameters.entrySet()) {
- putParameterIfAbsent(entry.getKey(), entry.getValue());
- }
-
- updateUnmodifiableParameters();
- }
- }
-
- /**
- * Put a parameter to the listener event only if the parameter is absent.
- *
- * Overridden parameters is not allowed, and an exception may be thrown to avoid a mis-configuration
- * between listeners setting the same parameters.
- *
- * @param name Name of the parameter.
- * @param value Value of the parameter.
- * @throws IllegalStateException if a parameter already exists.
- */
- private void putParameterIfAbsent(String name, String value) {
- if (parameters.containsKey(name)) {
- throw new IllegalStateException("Invalid attempt to overwrite a read-only parameter: " + name);
- }
-
- parameters.put(name, value);
- }
-
- /**
- * Keeps a cache of unmodifiable parameters returned by the getParameters() method.
- */
- private void updateUnmodifiableParameters() {
- unmodifiableParameters = Collections.unmodifiableMap(parameters);
- }
-}
http://git-wip-us.apache.org/repos/asf/hive/blob/c5a9673a/metastore/src/java/org/apache/hadoop/hive/metastore/events/LoadPartitionDoneEvent.java
----------------------------------------------------------------------
diff --git a/metastore/src/java/org/apache/hadoop/hive/metastore/events/LoadPartitionDoneEvent.java b/metastore/src/java/org/apache/hadoop/hive/metastore/events/LoadPartitionDoneEvent.java
deleted file mode 100644
index b56b3bb..0000000
--- a/metastore/src/java/org/apache/hadoop/hive/metastore/events/LoadPartitionDoneEvent.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.hadoop.hive.metastore.events;
-
-import java.util.Map;
-
-import org.apache.hadoop.hive.common.classification.InterfaceAudience;
-import org.apache.hadoop.hive.common.classification.InterfaceStability;
-import org.apache.hadoop.hive.metastore.HiveMetaStore.HMSHandler;
-import org.apache.hadoop.hive.metastore.api.Table;
-
-@InterfaceAudience.Public
-@InterfaceStability.Stable
-public class LoadPartitionDoneEvent extends ListenerEvent {
-
- private final Table table;
-
- private final Map<String,String> partSpec;
-
- public LoadPartitionDoneEvent(boolean status, Table table,
- Map<String,String> partSpec, HMSHandler handler) {
- super(status, handler);
- this.table = table;
- this.partSpec = partSpec;
- }
-
- /**
- * @return the tblName
- */
- public Table getTable() {
- return table;
- }
-
- /**
- * @return the partition Name
- */
- public Map<String,String> getPartitionName() {
- return partSpec;
- }
-
-}
http://git-wip-us.apache.org/repos/asf/hive/blob/c5a9673a/metastore/src/java/org/apache/hadoop/hive/metastore/events/PreAddIndexEvent.java
----------------------------------------------------------------------
diff --git a/metastore/src/java/org/apache/hadoop/hive/metastore/events/PreAddIndexEvent.java b/metastore/src/java/org/apache/hadoop/hive/metastore/events/PreAddIndexEvent.java
deleted file mode 100644
index 94a8836..0000000
--- a/metastore/src/java/org/apache/hadoop/hive/metastore/events/PreAddIndexEvent.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.hadoop.hive.metastore.events;
-
-import org.apache.hadoop.hive.common.classification.InterfaceAudience;
-import org.apache.hadoop.hive.common.classification.InterfaceStability;
-import org.apache.hadoop.hive.metastore.HiveMetaStore;
-import org.apache.hadoop.hive.metastore.api.Index;
-
-@InterfaceAudience.Public
-@InterfaceStability.Stable
-public class PreAddIndexEvent extends PreEventContext {
-
-private final Index table;
-
- public PreAddIndexEvent(Index table, HiveMetaStore.HMSHandler handler) {
- super(PreEventType.ADD_INDEX, handler);
- this.table = table;
- }
-
- public Index getIndex() {
- return table;
- }
-}
-
http://git-wip-us.apache.org/repos/asf/hive/blob/c5a9673a/metastore/src/java/org/apache/hadoop/hive/metastore/events/PreAddPartitionEvent.java
----------------------------------------------------------------------
diff --git a/metastore/src/java/org/apache/hadoop/hive/metastore/events/PreAddPartitionEvent.java b/metastore/src/java/org/apache/hadoop/hive/metastore/events/PreAddPartitionEvent.java
deleted file mode 100644
index 99105f3..0000000
--- a/metastore/src/java/org/apache/hadoop/hive/metastore/events/PreAddPartitionEvent.java
+++ /dev/null
@@ -1,79 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.hadoop.hive.metastore.events;
-
-import org.apache.hadoop.hive.common.classification.InterfaceAudience;
-import org.apache.hadoop.hive.common.classification.InterfaceStability;
-import org.apache.hadoop.hive.metastore.HiveMetaStore.HMSHandler;
-import org.apache.hadoop.hive.metastore.api.Partition;
-import org.apache.hadoop.hive.metastore.api.Table;
-import org.apache.hadoop.hive.metastore.partition.spec.PartitionSpecProxy;
-
-import java.util.Arrays;
-import java.util.Iterator;
-import java.util.List;
-
-@InterfaceAudience.Public
-@InterfaceStability.Stable
-public class PreAddPartitionEvent extends PreEventContext {
-
- private final Table table;
- private final List<Partition> partitions;
- private PartitionSpecProxy partitionSpecProxy;
-
- public PreAddPartitionEvent (Table table, List<Partition> partitions, HMSHandler handler) {
- super(PreEventType.ADD_PARTITION, handler);
- this.table = table;
- this.partitions = partitions;
- this.partitionSpecProxy = null;
- }
-
- public PreAddPartitionEvent(Table table, Partition partition, HMSHandler handler) {
- this(table, Arrays.asList(partition), handler);
- }
-
- /**
- * Alternative constructor, using
- */
- public PreAddPartitionEvent(Table table, PartitionSpecProxy partitionSpecProxy, HMSHandler handler) {
- this(table, (List<Partition>)null, handler);
- this.partitionSpecProxy = partitionSpecProxy;
- }
-
- /**
- * @return the partitions
- */
- public List<Partition> getPartitions() {
- return partitions;
- }
-
- /**
- * @return the table
- */
- public Table getTable() {
- return table ;
- }
-
- /**
- * @return Iterator over partition-list.
- */
- public Iterator<Partition> getPartitionIterator() {
- return partitionSpecProxy == null ? null : partitionSpecProxy.getPartitionIterator();
- }
-}
http://git-wip-us.apache.org/repos/asf/hive/blob/c5a9673a/metastore/src/java/org/apache/hadoop/hive/metastore/events/PreAlterDatabaseEvent.java
----------------------------------------------------------------------
diff --git a/metastore/src/java/org/apache/hadoop/hive/metastore/events/PreAlterDatabaseEvent.java b/metastore/src/java/org/apache/hadoop/hive/metastore/events/PreAlterDatabaseEvent.java
deleted file mode 100644
index 62e2674..0000000
--- a/metastore/src/java/org/apache/hadoop/hive/metastore/events/PreAlterDatabaseEvent.java
+++ /dev/null
@@ -1,47 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.hadoop.hive.metastore.events;
-
-import org.apache.hadoop.hive.metastore.HiveMetaStore.HMSHandler;
-import org.apache.hadoop.hive.metastore.api.Database;
-
-public class PreAlterDatabaseEvent extends PreEventContext {
-
- private final Database oldDB, newDB;
-
- public PreAlterDatabaseEvent(Database oldDB, Database newDB, HMSHandler handler) {
- super (PreEventType.ALTER_DATABASE, handler);
- this.oldDB = oldDB;
- this.newDB = newDB;
- }
-
- /**
- * @return the old db
- */
- public Database getOldDatabase () {
- return oldDB;
- }
-
- /**
- * @return the new db
- */
- public Database getNewDatabase() {
- return newDB;
- }
-}
http://git-wip-us.apache.org/repos/asf/hive/blob/c5a9673a/metastore/src/java/org/apache/hadoop/hive/metastore/events/PreAlterIndexEvent.java
----------------------------------------------------------------------
diff --git a/metastore/src/java/org/apache/hadoop/hive/metastore/events/PreAlterIndexEvent.java b/metastore/src/java/org/apache/hadoop/hive/metastore/events/PreAlterIndexEvent.java
deleted file mode 100644
index a2b7662..0000000
--- a/metastore/src/java/org/apache/hadoop/hive/metastore/events/PreAlterIndexEvent.java
+++ /dev/null
@@ -1,47 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.hadoop.hive.metastore.events;
-
-import org.apache.hadoop.hive.common.classification.InterfaceAudience;
-import org.apache.hadoop.hive.common.classification.InterfaceStability;
-import org.apache.hadoop.hive.metastore.HiveMetaStore;
-import org.apache.hadoop.hive.metastore.api.Index;
-
-@InterfaceAudience.Public
-@InterfaceStability.Stable
-public class PreAlterIndexEvent extends PreEventContext {
-
- private final Index newIndex;
- private final Index oldIndex;
-
- public PreAlterIndexEvent(Index oldIndex, Index newIndex, HiveMetaStore.HMSHandler handler) {
- super(PreEventType.ALTER_INDEX, handler);
- this.oldIndex = oldIndex;
- this.newIndex = newIndex;
- }
-
- public Index getOldIndex() {
- return oldIndex;
- }
-
- public Index getNewIndex() {
- return newIndex;
- }
-}
-
http://git-wip-us.apache.org/repos/asf/hive/blob/c5a9673a/metastore/src/java/org/apache/hadoop/hive/metastore/events/PreAlterPartitionEvent.java
----------------------------------------------------------------------
diff --git a/metastore/src/java/org/apache/hadoop/hive/metastore/events/PreAlterPartitionEvent.java b/metastore/src/java/org/apache/hadoop/hive/metastore/events/PreAlterPartitionEvent.java
deleted file mode 100644
index 5f29699..0000000
--- a/metastore/src/java/org/apache/hadoop/hive/metastore/events/PreAlterPartitionEvent.java
+++ /dev/null
@@ -1,65 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.hadoop.hive.metastore.events;
-
-import java.util.List;
-
-import org.apache.hadoop.hive.common.classification.InterfaceAudience;
-import org.apache.hadoop.hive.common.classification.InterfaceStability;
-import org.apache.hadoop.hive.metastore.HiveMetaStore.HMSHandler;
-import org.apache.hadoop.hive.metastore.api.Partition;
-
-@InterfaceAudience.Public
-@InterfaceStability.Stable
-public class PreAlterPartitionEvent extends PreEventContext {
-
- private final String dbName;
- private final String tableName;
- private final List<String> oldPartVals;
- private final Partition newPart;
-
- public PreAlterPartitionEvent(String dbName, String tableName, List<String> oldPartVals,
- Partition newPart, HMSHandler handler) {
- super(PreEventType.ALTER_PARTITION, handler);
- this.dbName = dbName;
- this.tableName = tableName;
- this.oldPartVals = oldPartVals;
- this.newPart = newPart;
- }
-
- public String getDbName() {
- return dbName;
- }
-
- public String getTableName() {
- return tableName;
- }
-
- public List<String> getOldPartVals() {
- return oldPartVals;
- }
-
- /**
- *
- * @return the new partition
- */
- public Partition getNewPartition() {
- return newPart;
- }
-}
http://git-wip-us.apache.org/repos/asf/hive/blob/c5a9673a/metastore/src/java/org/apache/hadoop/hive/metastore/events/PreAlterTableEvent.java
----------------------------------------------------------------------
diff --git a/metastore/src/java/org/apache/hadoop/hive/metastore/events/PreAlterTableEvent.java b/metastore/src/java/org/apache/hadoop/hive/metastore/events/PreAlterTableEvent.java
deleted file mode 100644
index 4e82ad1..0000000
--- a/metastore/src/java/org/apache/hadoop/hive/metastore/events/PreAlterTableEvent.java
+++ /dev/null
@@ -1,53 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
-
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.hadoop.hive.metastore.events;
-
-import org.apache.hadoop.hive.common.classification.InterfaceAudience;
-import org.apache.hadoop.hive.common.classification.InterfaceStability;
-import org.apache.hadoop.hive.metastore.HiveMetaStore.HMSHandler;
-import org.apache.hadoop.hive.metastore.api.Table;
-
-@InterfaceAudience.Public
-@InterfaceStability.Stable
-public class PreAlterTableEvent extends PreEventContext {
-
- private final Table newTable;
- private final Table oldTable;
-
- public PreAlterTableEvent (Table oldTable, Table newTable, HMSHandler handler) {
- super (PreEventType.ALTER_TABLE, handler);
- this.oldTable = oldTable;
- this.newTable = newTable;
- }
-
- /**
- * @return the old table
- */
- public Table getOldTable() {
- return oldTable;
- }
-
- /**
- * @return the new table
- */
- public Table getNewTable() {
- return newTable;
- }
-}
http://git-wip-us.apache.org/repos/asf/hive/blob/c5a9673a/metastore/src/java/org/apache/hadoop/hive/metastore/events/PreAuthorizationCallEvent.java
----------------------------------------------------------------------
diff --git a/metastore/src/java/org/apache/hadoop/hive/metastore/events/PreAuthorizationCallEvent.java b/metastore/src/java/org/apache/hadoop/hive/metastore/events/PreAuthorizationCallEvent.java
deleted file mode 100644
index 54f6dee..0000000
--- a/metastore/src/java/org/apache/hadoop/hive/metastore/events/PreAuthorizationCallEvent.java
+++ /dev/null
@@ -1,33 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.hadoop.hive.metastore.events;
-
-import org.apache.hadoop.hive.common.classification.InterfaceAudience;
-import org.apache.hadoop.hive.common.classification.InterfaceStability;
-import org.apache.hadoop.hive.metastore.HiveMetaStore.HMSHandler;
-
-@InterfaceAudience.Public
-@InterfaceStability.Stable
-public class PreAuthorizationCallEvent extends PreEventContext {
-
- public PreAuthorizationCallEvent (HMSHandler handler) {
- super(PreEventType.AUTHORIZATION_API_CALL, handler);
- }
-
-}
http://git-wip-us.apache.org/repos/asf/hive/blob/c5a9673a/metastore/src/java/org/apache/hadoop/hive/metastore/events/PreCreateDatabaseEvent.java
----------------------------------------------------------------------
diff --git a/metastore/src/java/org/apache/hadoop/hive/metastore/events/PreCreateDatabaseEvent.java b/metastore/src/java/org/apache/hadoop/hive/metastore/events/PreCreateDatabaseEvent.java
deleted file mode 100644
index a5f87e1..0000000
--- a/metastore/src/java/org/apache/hadoop/hive/metastore/events/PreCreateDatabaseEvent.java
+++ /dev/null
@@ -1,43 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.hadoop.hive.metastore.events;
-
-import org.apache.hadoop.hive.common.classification.InterfaceAudience;
-import org.apache.hadoop.hive.common.classification.InterfaceStability;
-import org.apache.hadoop.hive.metastore.HiveMetaStore.HMSHandler;
-import org.apache.hadoop.hive.metastore.api.Database;
-
-@InterfaceAudience.Public
-@InterfaceStability.Stable
-public class PreCreateDatabaseEvent extends PreEventContext {
-
- private final Database db;
-
- public PreCreateDatabaseEvent (Database db, HMSHandler handler) {
- super (PreEventType.CREATE_DATABASE, handler);
- this.db = db;
- }
-
- /**
- * @return the db
- */
- public Database getDatabase () {
- return db;
- }
-}
http://git-wip-us.apache.org/repos/asf/hive/blob/c5a9673a/metastore/src/java/org/apache/hadoop/hive/metastore/events/PreCreateTableEvent.java
----------------------------------------------------------------------
diff --git a/metastore/src/java/org/apache/hadoop/hive/metastore/events/PreCreateTableEvent.java b/metastore/src/java/org/apache/hadoop/hive/metastore/events/PreCreateTableEvent.java
deleted file mode 100644
index 799ad97..0000000
--- a/metastore/src/java/org/apache/hadoop/hive/metastore/events/PreCreateTableEvent.java
+++ /dev/null
@@ -1,43 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.hadoop.hive.metastore.events;
-
-import org.apache.hadoop.hive.common.classification.InterfaceAudience;
-import org.apache.hadoop.hive.common.classification.InterfaceStability;
-import org.apache.hadoop.hive.metastore.HiveMetaStore.HMSHandler;
-import org.apache.hadoop.hive.metastore.api.Table;
-
-@InterfaceAudience.Public
-@InterfaceStability.Stable
-public class PreCreateTableEvent extends PreEventContext {
-
- private final Table table;
-
- public PreCreateTableEvent(Table table, HMSHandler handler) {
- super(PreEventType.CREATE_TABLE, handler);
- this.table = table;
- }
-
- /**
- * @return the table
- */
- public Table getTable() {
- return table;
- }
-}
http://git-wip-us.apache.org/repos/asf/hive/blob/c5a9673a/metastore/src/java/org/apache/hadoop/hive/metastore/events/PreDropDatabaseEvent.java
----------------------------------------------------------------------
diff --git a/metastore/src/java/org/apache/hadoop/hive/metastore/events/PreDropDatabaseEvent.java b/metastore/src/java/org/apache/hadoop/hive/metastore/events/PreDropDatabaseEvent.java
deleted file mode 100644
index adcca6f..0000000
--- a/metastore/src/java/org/apache/hadoop/hive/metastore/events/PreDropDatabaseEvent.java
+++ /dev/null
@@ -1,43 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.hadoop.hive.metastore.events;
-
-import org.apache.hadoop.hive.common.classification.InterfaceAudience;
-import org.apache.hadoop.hive.common.classification.InterfaceStability;
-import org.apache.hadoop.hive.metastore.HiveMetaStore.HMSHandler;
-import org.apache.hadoop.hive.metastore.api.Database;
-
-@InterfaceAudience.Public
-@InterfaceStability.Stable
-public class PreDropDatabaseEvent extends PreEventContext {
-
- private final Database db;
-
- public PreDropDatabaseEvent(Database db, HMSHandler handler) {
- super(PreEventType.DROP_DATABASE, handler);
- this.db = db;
- }
-
- /**
- * @return the db
- */
- public Database getDatabase() {
- return db;
- }
-}
http://git-wip-us.apache.org/repos/asf/hive/blob/c5a9673a/metastore/src/java/org/apache/hadoop/hive/metastore/events/PreDropIndexEvent.java
----------------------------------------------------------------------
diff --git a/metastore/src/java/org/apache/hadoop/hive/metastore/events/PreDropIndexEvent.java b/metastore/src/java/org/apache/hadoop/hive/metastore/events/PreDropIndexEvent.java
deleted file mode 100644
index c7fd44b..0000000
--- a/metastore/src/java/org/apache/hadoop/hive/metastore/events/PreDropIndexEvent.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.hadoop.hive.metastore.events;
-
-import org.apache.hadoop.hive.common.classification.InterfaceAudience;
-import org.apache.hadoop.hive.common.classification.InterfaceStability;
-import org.apache.hadoop.hive.metastore.HiveMetaStore;
-import org.apache.hadoop.hive.metastore.api.Index;
-
-@InterfaceAudience.Public
-@InterfaceStability.Stable
-public class PreDropIndexEvent extends PreEventContext {
-
- private final Index index;
-
- public PreDropIndexEvent(Index index, HiveMetaStore.HMSHandler handler) {
- super(PreEventType.DROP_INDEX, handler);
- this.index = index;
- }
-
- public Index getIndex() {
- return index;
- }
-}
http://git-wip-us.apache.org/repos/asf/hive/blob/c5a9673a/metastore/src/java/org/apache/hadoop/hive/metastore/events/PreDropPartitionEvent.java
----------------------------------------------------------------------
diff --git a/metastore/src/java/org/apache/hadoop/hive/metastore/events/PreDropPartitionEvent.java b/metastore/src/java/org/apache/hadoop/hive/metastore/events/PreDropPartitionEvent.java
deleted file mode 100644
index e890ded..0000000
--- a/metastore/src/java/org/apache/hadoop/hive/metastore/events/PreDropPartitionEvent.java
+++ /dev/null
@@ -1,67 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.hadoop.hive.metastore.events;
-
-import org.apache.hadoop.hive.common.classification.InterfaceAudience;
-import org.apache.hadoop.hive.common.classification.InterfaceStability;
-import org.apache.hadoop.hive.metastore.HiveMetaStore.HMSHandler;
-import org.apache.hadoop.hive.metastore.api.Partition;
-import org.apache.hadoop.hive.metastore.api.Table;
-
-import java.util.Collections;
-import java.util.Iterator;
-
-@InterfaceAudience.Public
-@InterfaceStability.Stable
-public class PreDropPartitionEvent extends PreEventContext {
-
- private final Iterable<Partition> partitions;
- private final Table table;
- private final boolean deleteData;
-
- public PreDropPartitionEvent (Table table,
- Partition partition, boolean deleteData, HMSHandler handler) {
- super (PreEventType.DROP_PARTITION, handler);
- this.partitions = Collections.singletonList(partition);
- this.table = table;
- this.deleteData = deleteData;
- }
-
- /**
- * @return the partitions
- */
- public Iterator<Partition> getPartitionIterator() {
- return partitions.iterator();
- }
-
- /**
- * @return the table
- */
- public Table getTable() {
- return table;
- }
-
- /**
- * @return the deleteData flag
- */
- public boolean getDeleteData() {
-
- return deleteData;
- }
-}
http://git-wip-us.apache.org/repos/asf/hive/blob/c5a9673a/metastore/src/java/org/apache/hadoop/hive/metastore/events/PreDropTableEvent.java
----------------------------------------------------------------------
diff --git a/metastore/src/java/org/apache/hadoop/hive/metastore/events/PreDropTableEvent.java b/metastore/src/java/org/apache/hadoop/hive/metastore/events/PreDropTableEvent.java
deleted file mode 100644
index 6c7f169..0000000
--- a/metastore/src/java/org/apache/hadoop/hive/metastore/events/PreDropTableEvent.java
+++ /dev/null
@@ -1,55 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.hadoop.hive.metastore.events;
-
-import org.apache.hadoop.hive.common.classification.InterfaceAudience;
-import org.apache.hadoop.hive.common.classification.InterfaceStability;
-import org.apache.hadoop.hive.metastore.HiveMetaStore.HMSHandler;
-import org.apache.hadoop.hive.metastore.api.Table;
-
-@InterfaceAudience.Public
-@InterfaceStability.Stable
-public class PreDropTableEvent extends PreEventContext {
-
- private final Table table;
- private final boolean deleteData;
-
- public PreDropTableEvent(Table table, boolean deleteData, HMSHandler handler) {
- super(PreEventType.DROP_TABLE, handler);
- this.table = table;
- // In HiveMetaStore, the deleteData flag indicates whether DFS data should be
- // removed on a drop.
- this.deleteData = deleteData;
- }
-
- /**
- * @return the table
- */
- public Table getTable() {
- return table;
- }
-
- /**
- * @return the deleteData flag
- */
- public boolean getDeleteData() {
- return deleteData;
- }
-
-}
http://git-wip-us.apache.org/repos/asf/hive/blob/c5a9673a/metastore/src/java/org/apache/hadoop/hive/metastore/events/PreEventContext.java
----------------------------------------------------------------------
diff --git a/metastore/src/java/org/apache/hadoop/hive/metastore/events/PreEventContext.java b/metastore/src/java/org/apache/hadoop/hive/metastore/events/PreEventContext.java
deleted file mode 100644
index 0bd2ea6..0000000
--- a/metastore/src/java/org/apache/hadoop/hive/metastore/events/PreEventContext.java
+++ /dev/null
@@ -1,74 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.hadoop.hive.metastore.events;
-
-import org.apache.hadoop.hive.common.classification.InterfaceAudience;
-import org.apache.hadoop.hive.common.classification.InterfaceStability;
-import org.apache.hadoop.hive.metastore.HiveMetaStore.HMSHandler;
-
-
-/**
- * Base class for all the events which are defined for metastore.
- */
-@InterfaceAudience.Public
-@InterfaceStability.Stable
-public abstract class PreEventContext {
-
- public static enum PreEventType {
- CREATE_TABLE,
- DROP_TABLE,
- ALTER_TABLE,
- ADD_PARTITION,
- DROP_PARTITION,
- ALTER_PARTITION,
- CREATE_DATABASE,
- DROP_DATABASE,
- LOAD_PARTITION_DONE,
- AUTHORIZATION_API_CALL,
- READ_TABLE,
- READ_DATABASE,
- ADD_INDEX,
- ALTER_INDEX,
- DROP_INDEX,
- ALTER_DATABASE
- }
-
- private final PreEventType eventType;
- private final HMSHandler handler;
-
- public PreEventContext(PreEventType eventType, HMSHandler handler) {
- this.eventType = eventType;
- this.handler = handler;
- }
-
- /**
- * @return the event type
- */
- public PreEventType getEventType() {
- return eventType;
- }
-
- /**
- * @return the handler
- */
- public HMSHandler getHandler() {
- return handler;
- }
-
-}
http://git-wip-us.apache.org/repos/asf/hive/blob/c5a9673a/metastore/src/java/org/apache/hadoop/hive/metastore/events/PreLoadPartitionDoneEvent.java
----------------------------------------------------------------------
diff --git a/metastore/src/java/org/apache/hadoop/hive/metastore/events/PreLoadPartitionDoneEvent.java b/metastore/src/java/org/apache/hadoop/hive/metastore/events/PreLoadPartitionDoneEvent.java
deleted file mode 100644
index 82b72ed..0000000
--- a/metastore/src/java/org/apache/hadoop/hive/metastore/events/PreLoadPartitionDoneEvent.java
+++ /dev/null
@@ -1,58 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.hadoop.hive.metastore.events;
-
-import java.util.Map;
-
-import org.apache.hadoop.hive.common.classification.InterfaceAudience;
-import org.apache.hadoop.hive.common.classification.InterfaceStability;
-import org.apache.hadoop.hive.metastore.HiveMetaStore.HMSHandler;
-
-@InterfaceAudience.Public
-@InterfaceStability.Stable
-public class PreLoadPartitionDoneEvent extends PreEventContext {
-
- private final String dbName;
- private final String tableName;
- private final Map<String,String> partSpec;
-
- public PreLoadPartitionDoneEvent(String dbName, String tableName,
- Map<String, String> partSpec, HMSHandler handler) {
- super(PreEventType.LOAD_PARTITION_DONE, handler);
- this.dbName = dbName;
- this.tableName = tableName;
- this.partSpec = partSpec;
- }
-
- public String getDbName() {
- return dbName;
- }
-
- public String getTableName() {
- return tableName;
- }
-
- /**
- * @return the partition Name
- */
- public Map<String,String> getPartitionName() {
- return partSpec;
- }
-
-}
http://git-wip-us.apache.org/repos/asf/hive/blob/c5a9673a/metastore/src/java/org/apache/hadoop/hive/metastore/events/PreReadDatabaseEvent.java
----------------------------------------------------------------------
diff --git a/metastore/src/java/org/apache/hadoop/hive/metastore/events/PreReadDatabaseEvent.java b/metastore/src/java/org/apache/hadoop/hive/metastore/events/PreReadDatabaseEvent.java
deleted file mode 100644
index f223960..0000000
--- a/metastore/src/java/org/apache/hadoop/hive/metastore/events/PreReadDatabaseEvent.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.hadoop.hive.metastore.events;
-
-import org.apache.hadoop.hive.common.classification.InterfaceAudience;
-import org.apache.hadoop.hive.common.classification.InterfaceStability;
-import org.apache.hadoop.hive.metastore.HiveMetaStore.HMSHandler;
-import org.apache.hadoop.hive.metastore.api.Database;
-
-/**
- * Database read event
- */
-@InterfaceAudience.Public
-@InterfaceStability.Stable
-public class PreReadDatabaseEvent extends PreEventContext {
- private final Database db;
-
- public PreReadDatabaseEvent(Database db, HMSHandler handler) {
- super(PreEventType.READ_DATABASE, handler);
- this.db = db;
- }
-
- /**
- * @return the db
- */
- public Database getDatabase() {
- return db;
- }
-
-}
http://git-wip-us.apache.org/repos/asf/hive/blob/c5a9673a/metastore/src/java/org/apache/hadoop/hive/metastore/events/PreReadTableEvent.java
----------------------------------------------------------------------
diff --git a/metastore/src/java/org/apache/hadoop/hive/metastore/events/PreReadTableEvent.java b/metastore/src/java/org/apache/hadoop/hive/metastore/events/PreReadTableEvent.java
deleted file mode 100644
index e9d353a..0000000
--- a/metastore/src/java/org/apache/hadoop/hive/metastore/events/PreReadTableEvent.java
+++ /dev/null
@@ -1,47 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.hadoop.hive.metastore.events;
-
-import org.apache.hadoop.hive.common.classification.InterfaceAudience;
-import org.apache.hadoop.hive.common.classification.InterfaceStability;
-import org.apache.hadoop.hive.metastore.HiveMetaStore.HMSHandler;
-import org.apache.hadoop.hive.metastore.api.Table;
-
-/**
- * Table read event
- */
-@InterfaceAudience.Public
-@InterfaceStability.Stable
-public class PreReadTableEvent extends PreEventContext {
-
- private final Table table;
-
- public PreReadTableEvent(Table table, HMSHandler handler) {
- super(PreEventType.READ_TABLE, handler);
- this.table = table;
- }
-
- /**
- * @return the table
- */
- public Table getTable() {
- return table;
- }
-
-}
http://git-wip-us.apache.org/repos/asf/hive/blob/c5a9673a/metastore/src/java/org/apache/hadoop/hive/metastore/messaging/AddForeignKeyMessage.java
----------------------------------------------------------------------
diff --git a/metastore/src/java/org/apache/hadoop/hive/metastore/messaging/AddForeignKeyMessage.java b/metastore/src/java/org/apache/hadoop/hive/metastore/messaging/AddForeignKeyMessage.java
deleted file mode 100644
index 2eb14a1..0000000
--- a/metastore/src/java/org/apache/hadoop/hive/metastore/messaging/AddForeignKeyMessage.java
+++ /dev/null
@@ -1,36 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package org.apache.hadoop.hive.metastore.messaging;
-
-import java.util.List;
-
-import org.apache.hadoop.hive.metastore.api.SQLForeignKey;
-
-public abstract class AddForeignKeyMessage extends EventMessage {
- protected AddForeignKeyMessage() {
- super(EventType.ADD_FOREIGNKEY);
- }
-
- /**
- * Getter for list of foreign keys.
- * @return List of SQLForeignKey
- */
- public abstract List<SQLForeignKey> getForeignKeys() throws Exception;
-}
http://git-wip-us.apache.org/repos/asf/hive/blob/c5a9673a/metastore/src/java/org/apache/hadoop/hive/metastore/messaging/AddNotNullConstraintMessage.java
----------------------------------------------------------------------
diff --git a/metastore/src/java/org/apache/hadoop/hive/metastore/messaging/AddNotNullConstraintMessage.java b/metastore/src/java/org/apache/hadoop/hive/metastore/messaging/AddNotNullConstraintMessage.java
deleted file mode 100644
index 28ee610..0000000
--- a/metastore/src/java/org/apache/hadoop/hive/metastore/messaging/AddNotNullConstraintMessage.java
+++ /dev/null
@@ -1,36 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package org.apache.hadoop.hive.metastore.messaging;
-
-import java.util.List;
-
-import org.apache.hadoop.hive.metastore.api.SQLNotNullConstraint;
-
-public abstract class AddNotNullConstraintMessage extends EventMessage {
- protected AddNotNullConstraintMessage() {
- super(EventType.ADD_NOTNULLCONSTRAINT);
- }
-
- /**
- * Getter for list of not null constraints.
- * @return List of SQLNotNullConstraint
- */
- public abstract List<SQLNotNullConstraint> getNotNullConstraints() throws Exception;
-}
http://git-wip-us.apache.org/repos/asf/hive/blob/c5a9673a/metastore/src/java/org/apache/hadoop/hive/metastore/messaging/AddPartitionMessage.java
----------------------------------------------------------------------
diff --git a/metastore/src/java/org/apache/hadoop/hive/metastore/messaging/AddPartitionMessage.java b/metastore/src/java/org/apache/hadoop/hive/metastore/messaging/AddPartitionMessage.java
deleted file mode 100644
index 774c020..0000000
--- a/metastore/src/java/org/apache/hadoop/hive/metastore/messaging/AddPartitionMessage.java
+++ /dev/null
@@ -1,68 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package org.apache.hadoop.hive.metastore.messaging;
-
-import org.apache.hadoop.hive.metastore.api.Partition;
-import org.apache.hadoop.hive.metastore.api.Table;
-
-import java.util.List;
-import java.util.Map;
-
-public abstract class AddPartitionMessage extends EventMessage {
-
- protected AddPartitionMessage() {
- super(EventType.ADD_PARTITION);
- }
-
- /**
- * Getter for name of table (where partitions are added).
- * @return Table-name (String).
- */
- public abstract String getTable();
-
- public abstract String getTableType();
-
- public abstract Table getTableObj() throws Exception;
-
- /**
- * Getter for list of partitions added.
- * @return List of maps, where each map identifies values for each partition-key, for every added partition.
- */
- public abstract List<Map<String, String>> getPartitions ();
-
- public abstract Iterable<Partition> getPartitionObjs() throws Exception;
-
- @Override
- public EventMessage checkValid() {
- if (getTable() == null)
- throw new IllegalStateException("Table name unset.");
- if (getPartitions() == null)
- throw new IllegalStateException("Partition-list unset.");
- return super.checkValid();
- }
-
- /**
- * Get iterable of partition name and file lists created as a result of this DDL operation
- *
- * @return The iterable of partition PartitionFiles
- */
- public abstract Iterable<PartitionFiles> getPartitionFilesIter();
-
-}
http://git-wip-us.apache.org/repos/asf/hive/blob/c5a9673a/metastore/src/java/org/apache/hadoop/hive/metastore/messaging/AddPrimaryKeyMessage.java
----------------------------------------------------------------------
diff --git a/metastore/src/java/org/apache/hadoop/hive/metastore/messaging/AddPrimaryKeyMessage.java b/metastore/src/java/org/apache/hadoop/hive/metastore/messaging/AddPrimaryKeyMessage.java
deleted file mode 100644
index 0e899ad..0000000
--- a/metastore/src/java/org/apache/hadoop/hive/metastore/messaging/AddPrimaryKeyMessage.java
+++ /dev/null
@@ -1,35 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.hadoop.hive.metastore.messaging;
-
-import java.util.List;
-
-import org.apache.hadoop.hive.metastore.api.SQLPrimaryKey;
-
-public abstract class AddPrimaryKeyMessage extends EventMessage {
- protected AddPrimaryKeyMessage() {
- super(EventType.ADD_PRIMARYKEY);
- }
-
- /**
- * Getter for list of primary keys.
- * @return List of SQLPrimaryKey
- */
- public abstract List<SQLPrimaryKey> getPrimaryKeys() throws Exception;
-}
http://git-wip-us.apache.org/repos/asf/hive/blob/c5a9673a/metastore/src/java/org/apache/hadoop/hive/metastore/messaging/AddUniqueConstraintMessage.java
----------------------------------------------------------------------
diff --git a/metastore/src/java/org/apache/hadoop/hive/metastore/messaging/AddUniqueConstraintMessage.java b/metastore/src/java/org/apache/hadoop/hive/metastore/messaging/AddUniqueConstraintMessage.java
deleted file mode 100644
index 8072d84f..0000000
--- a/metastore/src/java/org/apache/hadoop/hive/metastore/messaging/AddUniqueConstraintMessage.java
+++ /dev/null
@@ -1,36 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package org.apache.hadoop.hive.metastore.messaging;
-
-import java.util.List;
-
-import org.apache.hadoop.hive.metastore.api.SQLUniqueConstraint;
-
-public abstract class AddUniqueConstraintMessage extends EventMessage {
- protected AddUniqueConstraintMessage() {
- super(EventType.ADD_UNIQUECONSTRAINT);
- }
-
- /**
- * Getter for list of unique constraints.
- * @return List of SQLUniqueConstraint
- */
- public abstract List<SQLUniqueConstraint> getUniqueConstraints() throws Exception;
-}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/hive/blob/c5a9673a/metastore/src/java/org/apache/hadoop/hive/metastore/messaging/AlterIndexMessage.java
----------------------------------------------------------------------
diff --git a/metastore/src/java/org/apache/hadoop/hive/metastore/messaging/AlterIndexMessage.java b/metastore/src/java/org/apache/hadoop/hive/metastore/messaging/AlterIndexMessage.java
deleted file mode 100644
index e72a94b..0000000
--- a/metastore/src/java/org/apache/hadoop/hive/metastore/messaging/AlterIndexMessage.java
+++ /dev/null
@@ -1,33 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package org.apache.hadoop.hive.metastore.messaging;
-
-import org.apache.hadoop.hive.metastore.api.Index;
-
-public abstract class AlterIndexMessage extends EventMessage {
-
- public abstract Index getIndexObjBefore() throws Exception;
-
- public abstract Index getIndexObjAfter() throws Exception;
-
- protected AlterIndexMessage() {
- super(EventType.ALTER_INDEX);
- }
-}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/hive/blob/c5a9673a/metastore/src/java/org/apache/hadoop/hive/metastore/messaging/AlterPartitionMessage.java
----------------------------------------------------------------------
diff --git a/metastore/src/java/org/apache/hadoop/hive/metastore/messaging/AlterPartitionMessage.java b/metastore/src/java/org/apache/hadoop/hive/metastore/messaging/AlterPartitionMessage.java
deleted file mode 100644
index 077c9f7..0000000
--- a/metastore/src/java/org/apache/hadoop/hive/metastore/messaging/AlterPartitionMessage.java
+++ /dev/null
@@ -1,69 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.hadoop.hive.metastore.messaging;
-
-import org.apache.hadoop.hive.metastore.api.Partition;
-import org.apache.hadoop.hive.metastore.api.Table;
-
-import java.util.Map;
-
-public abstract class AlterPartitionMessage extends EventMessage {
-
- protected AlterPartitionMessage() {
- super(EventType.ALTER_PARTITION);
- }
-
- public abstract String getTable();
-
- public abstract String getTableType();
-
- public abstract boolean getIsTruncateOp();
-
- public abstract Map<String,String> getKeyValues();
-
- public abstract Table getTableObj() throws Exception;
-
- public abstract Partition getPtnObjBefore() throws Exception;
-
- public abstract Partition getPtnObjAfter() throws Exception;
- @Override
- public EventMessage checkValid() {
- if (getTable() == null) throw new IllegalStateException("Table name unset.");
- if (getKeyValues() == null) throw new IllegalStateException("Partition values unset");
- try {
- if (getTableObj() == null){
- throw new IllegalStateException("Table object not set.");
- }
- if (getPtnObjAfter() == null){
- throw new IllegalStateException("Partition object(after) not set.");
- }
- if (getPtnObjBefore() == null){
- throw new IllegalStateException("Partition object(before) not set.");
- }
- } catch (Exception e) {
- if (! (e instanceof IllegalStateException)){
- throw new IllegalStateException("Event not set up correctly",e);
- } else {
- throw (IllegalStateException) e;
- }
- }
- return super.checkValid();
- }
-}
-
http://git-wip-us.apache.org/repos/asf/hive/blob/c5a9673a/metastore/src/java/org/apache/hadoop/hive/metastore/messaging/AlterTableMessage.java
----------------------------------------------------------------------
diff --git a/metastore/src/java/org/apache/hadoop/hive/metastore/messaging/AlterTableMessage.java b/metastore/src/java/org/apache/hadoop/hive/metastore/messaging/AlterTableMessage.java
deleted file mode 100644
index 58f01fe..0000000
--- a/metastore/src/java/org/apache/hadoop/hive/metastore/messaging/AlterTableMessage.java
+++ /dev/null
@@ -1,58 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.hadoop.hive.metastore.messaging;
-
-import org.apache.hadoop.hive.metastore.api.Table;
-
-public abstract class AlterTableMessage extends EventMessage {
-
- protected AlterTableMessage() {
- super(EventType.ALTER_TABLE);
- }
-
- public abstract String getTable();
-
- public abstract String getTableType();
-
- public abstract boolean getIsTruncateOp();
-
- public abstract Table getTableObjBefore() throws Exception;
-
- public abstract Table getTableObjAfter() throws Exception;
-
- @Override
- public EventMessage checkValid() {
- if (getTable() == null) throw new IllegalStateException("Table name unset.");
- try {
- if (getTableObjAfter() == null){
- throw new IllegalStateException("Table object(after) not set.");
- }
- if (getTableObjBefore() == null){
- throw new IllegalStateException("Table object(before) not set.");
- }
- } catch (Exception e) {
- if (! (e instanceof IllegalStateException)){
- throw new IllegalStateException("Event not set up correctly",e);
- } else {
- throw (IllegalStateException) e;
- }
- }
- return super.checkValid();
- }
-}
http://git-wip-us.apache.org/repos/asf/hive/blob/c5a9673a/metastore/src/java/org/apache/hadoop/hive/metastore/messaging/CreateDatabaseMessage.java
----------------------------------------------------------------------
diff --git a/metastore/src/java/org/apache/hadoop/hive/metastore/messaging/CreateDatabaseMessage.java b/metastore/src/java/org/apache/hadoop/hive/metastore/messaging/CreateDatabaseMessage.java
deleted file mode 100644
index 7614298..0000000
--- a/metastore/src/java/org/apache/hadoop/hive/metastore/messaging/CreateDatabaseMessage.java
+++ /dev/null
@@ -1,28 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package org.apache.hadoop.hive.metastore.messaging;
-
-public abstract class CreateDatabaseMessage extends EventMessage {
-
- protected CreateDatabaseMessage() {
- super(EventType.CREATE_DATABASE);
- }
-
-}
http://git-wip-us.apache.org/repos/asf/hive/blob/c5a9673a/metastore/src/java/org/apache/hadoop/hive/metastore/messaging/CreateFunctionMessage.java
----------------------------------------------------------------------
diff --git a/metastore/src/java/org/apache/hadoop/hive/metastore/messaging/CreateFunctionMessage.java b/metastore/src/java/org/apache/hadoop/hive/metastore/messaging/CreateFunctionMessage.java
deleted file mode 100644
index d94a3f0..0000000
--- a/metastore/src/java/org/apache/hadoop/hive/metastore/messaging/CreateFunctionMessage.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package org.apache.hadoop.hive.metastore.messaging;
-
-import org.apache.hadoop.hive.metastore.api.Function;
-
-public abstract class CreateFunctionMessage extends EventMessage {
-
- protected CreateFunctionMessage() {
- super(EventType.CREATE_FUNCTION);
- }
-
- public abstract Function getFunctionObj() throws Exception;
-
- @Override
- public EventMessage checkValid() {
- try {
- if (getFunctionObj() == null)
- throw new IllegalStateException("Function object unset.");
- } catch (Exception e) {
- if (! (e instanceof IllegalStateException)){
- throw new IllegalStateException("Event not set up correctly", e);
- } else {
- throw (IllegalStateException) e;
- }
- }
- return super.checkValid();
- }
-}
http://git-wip-us.apache.org/repos/asf/hive/blob/c5a9673a/metastore/src/java/org/apache/hadoop/hive/metastore/messaging/CreateIndexMessage.java
----------------------------------------------------------------------
diff --git a/metastore/src/java/org/apache/hadoop/hive/metastore/messaging/CreateIndexMessage.java b/metastore/src/java/org/apache/hadoop/hive/metastore/messaging/CreateIndexMessage.java
deleted file mode 100644
index 3ce0d62..0000000
--- a/metastore/src/java/org/apache/hadoop/hive/metastore/messaging/CreateIndexMessage.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package org.apache.hadoop.hive.metastore.messaging;
-
-import org.apache.hadoop.hive.metastore.api.Index;
-
-public abstract class CreateIndexMessage extends EventMessage {
-
- protected CreateIndexMessage() {
- super(EventType.CREATE_INDEX);
- }
-
- public abstract Index getIndexObj() throws Exception;
-
- @Override
- public EventMessage checkValid() {
- try {
- if (getIndexObj() == null)
- throw new IllegalStateException("Function object unset.");
- } catch (Exception e) {
- if (! (e instanceof IllegalStateException)){
- throw new IllegalStateException("Event not set up correctly", e);
- } else {
- throw (IllegalStateException) e;
- }
- }
- return super.checkValid();
- }
-}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/hive/blob/c5a9673a/metastore/src/java/org/apache/hadoop/hive/metastore/messaging/CreateTableMessage.java
----------------------------------------------------------------------
diff --git a/metastore/src/java/org/apache/hadoop/hive/metastore/messaging/CreateTableMessage.java b/metastore/src/java/org/apache/hadoop/hive/metastore/messaging/CreateTableMessage.java
deleted file mode 100644
index b75caa6..0000000
--- a/metastore/src/java/org/apache/hadoop/hive/metastore/messaging/CreateTableMessage.java
+++ /dev/null
@@ -1,53 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package org.apache.hadoop.hive.metastore.messaging;
-
-import org.apache.hadoop.hive.metastore.api.Table;
-
-public abstract class CreateTableMessage extends EventMessage {
-
- protected CreateTableMessage() {
- super(EventType.CREATE_TABLE);
- }
-
- /**
- * Getter for the name of table created
- * @return Table-name (String).
- */
- public abstract String getTable();
-
- public abstract String getTableType();
-
- public abstract Table getTableObj() throws Exception;
-
- /**
- * Get list of files created as a result of this DML operation
- *
- * @return The iterable of files
- */
- public abstract Iterable<String> getFiles();
-
- @Override
- public EventMessage checkValid() {
- if (getTable() == null)
- throw new IllegalStateException("Table name unset.");
- return super.checkValid();
- }
-}
http://git-wip-us.apache.org/repos/asf/hive/blob/c5a9673a/metastore/src/java/org/apache/hadoop/hive/metastore/messaging/DropConstraintMessage.java
----------------------------------------------------------------------
diff --git a/metastore/src/java/org/apache/hadoop/hive/metastore/messaging/DropConstraintMessage.java b/metastore/src/java/org/apache/hadoop/hive/metastore/messaging/DropConstraintMessage.java
deleted file mode 100644
index 6e691e9..0000000
--- a/metastore/src/java/org/apache/hadoop/hive/metastore/messaging/DropConstraintMessage.java
+++ /dev/null
@@ -1,29 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.hadoop.hive.metastore.messaging;
-
-public abstract class DropConstraintMessage extends EventMessage {
- protected DropConstraintMessage() {
- super(EventType.DROP_CONSTRAINT);
- }
-
- public abstract String getTable();
-
- public abstract String getConstraint();
-}
http://git-wip-us.apache.org/repos/asf/hive/blob/c5a9673a/metastore/src/java/org/apache/hadoop/hive/metastore/messaging/DropDatabaseMessage.java
----------------------------------------------------------------------
diff --git a/metastore/src/java/org/apache/hadoop/hive/metastore/messaging/DropDatabaseMessage.java b/metastore/src/java/org/apache/hadoop/hive/metastore/messaging/DropDatabaseMessage.java
deleted file mode 100644
index fa6da38..0000000
--- a/metastore/src/java/org/apache/hadoop/hive/metastore/messaging/DropDatabaseMessage.java
+++ /dev/null
@@ -1,27 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package org.apache.hadoop.hive.metastore.messaging;
-
-public abstract class DropDatabaseMessage extends EventMessage {
-
- protected DropDatabaseMessage() {
- super(EventType.DROP_DATABASE);
- }
-}
http://git-wip-us.apache.org/repos/asf/hive/blob/c5a9673a/metastore/src/java/org/apache/hadoop/hive/metastore/messaging/DropFunctionMessage.java
----------------------------------------------------------------------
diff --git a/metastore/src/java/org/apache/hadoop/hive/metastore/messaging/DropFunctionMessage.java b/metastore/src/java/org/apache/hadoop/hive/metastore/messaging/DropFunctionMessage.java
deleted file mode 100644
index 2b45d40..0000000
--- a/metastore/src/java/org/apache/hadoop/hive/metastore/messaging/DropFunctionMessage.java
+++ /dev/null
@@ -1,38 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package org.apache.hadoop.hive.metastore.messaging;
-
-public abstract class DropFunctionMessage extends EventMessage {
-
- public abstract String getFunctionName();
-
- protected DropFunctionMessage() {
- super(EventType.DROP_FUNCTION);
- }
-
- @Override
- public EventMessage checkValid() {
- if (getFunctionName() == null){
- throw new IllegalStateException("Function name unset.");
- }
- return super.checkValid();
- }
-
-}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/hive/blob/c5a9673a/metastore/src/java/org/apache/hadoop/hive/metastore/messaging/DropIndexMessage.java
----------------------------------------------------------------------
diff --git a/metastore/src/java/org/apache/hadoop/hive/metastore/messaging/DropIndexMessage.java b/metastore/src/java/org/apache/hadoop/hive/metastore/messaging/DropIndexMessage.java
deleted file mode 100644
index 5997f92..0000000
--- a/metastore/src/java/org/apache/hadoop/hive/metastore/messaging/DropIndexMessage.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package org.apache.hadoop.hive.metastore.messaging;
-
-public abstract class DropIndexMessage extends EventMessage {
-
- public abstract String getIndexName();
- public abstract String getOrigTableName();
- public abstract String getIndexTableName();
-
- protected DropIndexMessage() {
- super(EventType.DROP_INDEX);
- }
-
- @Override
- public EventMessage checkValid() {
- if (getIndexName() == null){
- throw new IllegalStateException("Index name unset.");
- }
- if (getOrigTableName() == null){
- throw new IllegalStateException("Index original table name unset.");
- }
- // NOTE: we do not do a not-null check on getIndexTableName,
- // since, per the index design wiki, it can actually be null.
-
- return super.checkValid();
- }
-
-}
\ No newline at end of file