You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hive.apache.org by vi...@apache.org on 2018/07/19 19:55:21 UTC
[22/51] [partial] hive git commit: HIVE-20188 : Split server-specific
code outside of standalone metastore-common (Alexander Kolbasov reviewed by
Vihang Karajgaonkar)
http://git-wip-us.apache.org/repos/asf/hive/blob/081fa368/standalone-metastore/metastore-common/src/main/java/org/apache/hadoop/hive/metastore/metrics/Metrics.java
----------------------------------------------------------------------
diff --git a/standalone-metastore/metastore-common/src/main/java/org/apache/hadoop/hive/metastore/metrics/Metrics.java b/standalone-metastore/metastore-common/src/main/java/org/apache/hadoop/hive/metastore/metrics/Metrics.java
deleted file mode 100644
index e4866a6..0000000
--- a/standalone-metastore/metastore-common/src/main/java/org/apache/hadoop/hive/metastore/metrics/Metrics.java
+++ /dev/null
@@ -1,244 +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
- * <p>
- * http://www.apache.org/licenses/LICENSE-2.0
- * <p>
- * 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.metrics;
-
-import com.codahale.metrics.ConsoleReporter;
-import com.codahale.metrics.Counter;
-import com.codahale.metrics.Gauge;
-import com.codahale.metrics.JmxReporter;
-import com.codahale.metrics.MetricRegistry;
-import com.codahale.metrics.Reporter;
-import com.codahale.metrics.ScheduledReporter;
-import com.codahale.metrics.Timer;
-import com.codahale.metrics.jvm.BufferPoolMetricSet;
-import com.codahale.metrics.jvm.ClassLoadingGaugeSet;
-import com.codahale.metrics.jvm.GarbageCollectorMetricSet;
-import com.codahale.metrics.jvm.MemoryUsageGaugeSet;
-import com.codahale.metrics.jvm.ThreadStatesGaugeSet;
-import com.github.joshelser.dropwizard.metrics.hadoop.HadoopMetrics2Reporter;
-import com.google.common.annotations.VisibleForTesting;
-import org.apache.hadoop.conf.Configuration;
-import org.apache.hadoop.hive.metastore.conf.MetastoreConf;
-import org.apache.hadoop.metrics2.lib.DefaultMetricsSystem;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import java.lang.management.ManagementFactory;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.concurrent.TimeUnit;
-import java.util.concurrent.atomic.AtomicInteger;
-
-public class Metrics {
- private static final Logger LOGGER = LoggerFactory.getLogger(Metrics.class);
-
- private static Metrics self;
- private static final AtomicInteger singletonAtomicInteger = new AtomicInteger();
-
- private final MetricRegistry registry;
- private List<Reporter> reporters;
- private List<ScheduledReporter> scheduledReporters;
- private Map<String, AtomicInteger> gaugeAtomics;
- private boolean hadoopMetricsStarted;
-
- public static synchronized Metrics initialize(Configuration conf) {
- if (self == null) {
- self = new Metrics(conf);
- }
- return self;
- }
-
- public static MetricRegistry getRegistry() {
- if (self == null) return null;
- return self.registry;
- }
-
- public static void shutdown() {
- if (self != null) {
- for (ScheduledReporter reporter : self.scheduledReporters) {
- reporter.stop();
- reporter.close();
- }
- if (self.hadoopMetricsStarted) DefaultMetricsSystem.shutdown();
- self = null;
- }
- }
-
- /**
- * Get an existing counter or create a new one if the requested one does not yet exist. Creation
- * is synchronized to assure that only one instance of the counter is created.
- * @param name name of the counter
- * @return new Counter, or existing one if it already exists. This will return null if the
- * metrics have not been initialized.
- */
- public static Counter getOrCreateCounter(String name) {
- if (self == null) return null;
- Map<String, Counter> counters = self.registry.getCounters();
- Counter counter = counters.get(name);
- if (counter != null) return counter;
- // Looks like it doesn't exist. Lock so that two threads don't create it at once.
- synchronized (Metrics.class) {
- // Recheck to make sure someone didn't create it while we waited.
- counters = self.registry.getCounters();
- counter = counters.get(name);
- if (counter != null) return counter;
- return self.registry.counter(name);
- }
- }
-
- /**
- * Get an existing timer or create a new one if the requested one does not yet exist. Creation
- * is synchronized to assure that only one instance of the counter is created.
- * @param name timer name
- * @return new Timer, or existing one if it already exists, null if the metrics have not been
- * initialized.
- */
- public static Timer getOrCreateTimer(String name) {
- if (self == null) return null;
- Map<String, Timer> timers = self.registry.getTimers();
- Timer timer = timers.get(name);
- if (timer != null) return timer;
- synchronized (Metrics.class) {
- timers = self.registry.getTimers();
- timer = timers.get(name);
- if (timer != null) return timer;
- return self.registry.timer(name);
- }
- }
-
- /**
- * Get the AtomicInteger behind an existing gauge, or create a new gauge if it does not already
- * exist.
- * @param name Name of gauge. This should come from MetricConstants
- * @return AtomicInteger underlying this gauge.
- */
- public static AtomicInteger getOrCreateGauge(String name) {
- // We return a garbage value if metrics haven't been initialized so that callers don't have
- // to keep checking if the resulting value is null.
- if (self == null) return singletonAtomicInteger;
- AtomicInteger ai = self.gaugeAtomics.get(name);
- if (ai != null) return ai;
- synchronized (Metrics.class) {
- ai = self.gaugeAtomics.get(name);
- if (ai != null) return ai;
- ai = new AtomicInteger();
- final AtomicInteger forGauge = ai;
- self.gaugeAtomics.put(name, ai);
- self.registry.register(name, new Gauge<Integer>() {
- @Override
- public Integer getValue() {
- return forGauge.get();
- }
- });
- return ai;
- }
- }
-
- @VisibleForTesting
- static List<Reporter> getReporters() {
- return self.reporters;
- }
-
- private Metrics(Configuration conf) {
- registry = new MetricRegistry();
-
- registry.registerAll(new GarbageCollectorMetricSet());
- registry.registerAll(new BufferPoolMetricSet(ManagementFactory.getPlatformMBeanServer()));
- registry.registerAll(new MemoryUsageGaugeSet());
- registry.registerAll(new ThreadStatesGaugeSet());
- registry.registerAll(new ClassLoadingGaugeSet());
-
- /*
- * This is little complicated. First we look for our own config values on this. If those
- * aren't set we use the Hive ones. But Hive also has multiple ways to do this, so we need to
- * look in both of theirs as well. We can't use theirs directly because they wrap the
- * codahale reporters in their own and we do not.
- */
- // Check our config value first. I'm explicitly avoiding getting the default value for now,
- // as I don't want our default to override a Hive set value.
- String reportersToStart = conf.get(MetastoreConf.ConfVars.METRICS_REPORTERS.getVarname());
- if (reportersToStart == null) {
- // Now look in the current Hive config value. Again, avoiding getting defaults
- reportersToStart =
- conf.get(MetastoreConf.ConfVars.HIVE_CODAHALE_METRICS_REPORTER_CLASSES.getHiveName());
- if (reportersToStart == null) {
- // Last chance, look in the old Hive config value. Still avoiding defaults.
- reportersToStart =
- conf.get(MetastoreConf.ConfVars.HIVE_METRICS_REPORTER.getHiveName());
- if (reportersToStart == null) {
- // Alright fine, we'll use our defaults
- reportersToStart = MetastoreConf.getVar(conf, MetastoreConf.ConfVars.METRICS_REPORTERS);
- }
- }
- }
-
- reporters = new ArrayList<>();
- scheduledReporters = new ArrayList<>();
- if (reportersToStart != null && reportersToStart.length() > 0) {
- String[] reporterNames = reportersToStart.toLowerCase().split(",");
- for (String reporterName : reporterNames) {
- if (reporterName.equals("console") || reporterName.endsWith("consolemetricsreporter")) {
- ConsoleReporter reporter = ConsoleReporter.forRegistry(registry)
- .convertRatesTo(TimeUnit.SECONDS)
- .convertDurationsTo(TimeUnit.MILLISECONDS)
- .build();
- reporter.start(15, TimeUnit.SECONDS);
- reporters.add(reporter);
- scheduledReporters.add(reporter);
- } else if (reporterName.equals("jmx") || reporterName.endsWith("jmxmetricsreporter")) {
- JmxReporter reporter = JmxReporter.forRegistry(registry)
- .convertRatesTo(TimeUnit.SECONDS)
- .convertDurationsTo(TimeUnit.MILLISECONDS)
- .build();
- reporter.start();
- reporters.add(reporter);
- } else if (reporterName.startsWith("json") || reporterName.endsWith("jsonfilemetricsreporter")) {
- // We have to initialize the thread pool before we start this one, as it uses it
- JsonReporter reporter = JsonReporter.forRegistry(registry, conf)
- .convertRatesTo(TimeUnit.SECONDS)
- .convertDurationsTo(TimeUnit.MILLISECONDS)
- .build();
- reporter.start(MetastoreConf.getTimeVar(conf,
- MetastoreConf.ConfVars.METRICS_JSON_FILE_INTERVAL, TimeUnit.SECONDS), TimeUnit.SECONDS);
- reporters.add(reporter);
- scheduledReporters.add(reporter);
- } else if (reporterName.startsWith("hadoop") || reporterName.endsWith("metrics2reporter")) {
- String applicationName = MetastoreConf.getVar(conf, MetastoreConf.ConfVars.METRICS_HADOOP2_COMPONENT_NAME);
- HadoopMetrics2Reporter reporter = HadoopMetrics2Reporter.forRegistry(registry)
- .convertRatesTo(TimeUnit.SECONDS)
- .convertDurationsTo(TimeUnit.MILLISECONDS)
- .build(DefaultMetricsSystem.initialize(applicationName), applicationName, "Runtime metadata" +
- " catalog", "General");
- reporter.start(1, TimeUnit.MINUTES);
- reporters.add(reporter);
- scheduledReporters.add(reporter);
- hadoopMetricsStarted = true;
- } else {
- throw new RuntimeException("Unknown metric type " + reporterName);
- }
- }
- } else {
- LOGGER.warn("No metrics reporters configured.");
- }
-
- // Create map for tracking gauges
- gaugeAtomics = new HashMap<>();
- }
-}
http://git-wip-us.apache.org/repos/asf/hive/blob/081fa368/standalone-metastore/metastore-common/src/main/java/org/apache/hadoop/hive/metastore/metrics/MetricsConstants.java
----------------------------------------------------------------------
diff --git a/standalone-metastore/metastore-common/src/main/java/org/apache/hadoop/hive/metastore/metrics/MetricsConstants.java b/standalone-metastore/metastore-common/src/main/java/org/apache/hadoop/hive/metastore/metrics/MetricsConstants.java
deleted file mode 100644
index 3b188f8..0000000
--- a/standalone-metastore/metastore-common/src/main/java/org/apache/hadoop/hive/metastore/metrics/MetricsConstants.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
- * <p>
- * http://www.apache.org/licenses/LICENSE-2.0
- * <p>
- * 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.metrics;
-
-public class MetricsConstants {
- public static final String ACTIVE_CALLS = "active_calls_";
- public static final String API_PREFIX = "api_";
-
- public static final String CREATE_TOTAL_DATABASES = "create_total_count_dbs";
- public static final String CREATE_TOTAL_TABLES = "create_total_count_tables";
- public static final String CREATE_TOTAL_PARTITIONS = "create_total_count_partitions";
-
- public static final String DELETE_TOTAL_DATABASES = "delete_total_count_dbs";
- public static final String DELETE_TOTAL_TABLES = "delete_total_count_tables";
- public static final String DELETE_TOTAL_PARTITIONS = "delete_total_count_partitions";
-
- public static final String DIRECTSQL_ERRORS = "directsql_errors";
-
- public static final String JVM_PAUSE_INFO = "jvm.pause.info-threshold";
- public static final String JVM_PAUSE_WARN = "jvm.pause.warn-threshold";
- public static final String JVM_EXTRA_SLEEP = "jvm.pause.extraSleepTime";
-
- public static final String NUM_OPEN_TXNS = "num_open_transactions";
- public static final String NUM_TIMED_OUT_TXNS = "num_timed_out_transactions";
-
- public static final String OPEN_CONNECTIONS = "open_connections";
-
- public static final String TOTAL_DATABASES = "total_count_dbs";
- public static final String TOTAL_TABLES = "total_count_tables";
- public static final String TOTAL_PARTITIONS = "total_count_partitions";
-}
http://git-wip-us.apache.org/repos/asf/hive/blob/081fa368/standalone-metastore/metastore-common/src/main/java/org/apache/hadoop/hive/metastore/metrics/PerfLogger.java
----------------------------------------------------------------------
diff --git a/standalone-metastore/metastore-common/src/main/java/org/apache/hadoop/hive/metastore/metrics/PerfLogger.java b/standalone-metastore/metastore-common/src/main/java/org/apache/hadoop/hive/metastore/metrics/PerfLogger.java
deleted file mode 100644
index a2def26..0000000
--- a/standalone-metastore/metastore-common/src/main/java/org/apache/hadoop/hive/metastore/metrics/PerfLogger.java
+++ /dev/null
@@ -1,194 +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.metrics;
-
-import com.codahale.metrics.Timer;
-import com.google.common.collect.ImmutableMap;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import java.util.HashMap;
-import java.util.Map;
-
-/**
- * PerfLogger.
- *
- * Can be used to measure and log the time spent by a piece of code.
- */
-public class PerfLogger {
- protected final Map<String, Long> startTimes = new HashMap<>();
- protected final Map<String, Long> endTimes = new HashMap<>();
-
- static final private Logger LOG = LoggerFactory.getLogger(PerfLogger.class.getName());
- protected static final ThreadLocal<PerfLogger> perfLogger = new ThreadLocal<>();
-
-
- private PerfLogger() {
- // Use getPerfLogger to get an instance of PerfLogger
- }
-
- /**
- * Get the singleton PerfLogger instance.
- * @param resetPerfLogger if false, get the current PerfLogger, or create a new one if a
- * current one does not exist. If true, a new instance of PerfLogger
- * will be returned rather than the existing one. Note that the
- * existing PerfLogger is not shutdown and any object which already has a
- * reference to it may continue to use it. But all future calls to this
- * method with this set to false will get the new PerfLogger instance.
- * @return a PerfLogger
- */
- public static PerfLogger getPerfLogger(boolean resetPerfLogger) {
- PerfLogger result = perfLogger.get();
- if (resetPerfLogger || result == null) {
- result = new PerfLogger();
- perfLogger.set(result);
- }
- return result;
- }
-
- public static void setPerfLogger(PerfLogger resetPerfLogger) {
- perfLogger.set(resetPerfLogger);
- }
-
- /**
- * Call this function when you start to measure time spent by a piece of code.
- * @param callerName the logging object to be used.
- * @param method method or ID that identifies this perf log element.
- */
- public void PerfLogBegin(String callerName, String method) {
- long startTime = System.currentTimeMillis();
- startTimes.put(method, new Long(startTime));
- if (LOG.isDebugEnabled()) {
- LOG.debug("<PERFLOG method=" + method + " from=" + callerName + ">");
- }
- beginMetrics(method);
- }
- /**
- * Call this function in correspondence of PerfLogBegin to mark the end of the measurement.
- * @param callerName
- * @param method
- * @return long duration the difference between now and startTime, or -1 if startTime is null
- */
- public long PerfLogEnd(String callerName, String method) {
- return PerfLogEnd(callerName, method, null);
- }
-
- /**
- * Call this function in correspondence of PerfLogBegin to mark the end of the measurement.
- * @param callerName
- * @param method
- * @return long duration the difference between now and startTime, or -1 if startTime is null
- */
- public long PerfLogEnd(String callerName, String method, String additionalInfo) {
- Long startTime = startTimes.get(method);
- long endTime = System.currentTimeMillis();
- endTimes.put(method, new Long(endTime));
- long duration = startTime == null ? -1 : endTime - startTime.longValue();
-
- if (LOG.isDebugEnabled()) {
- StringBuilder sb = new StringBuilder("</PERFLOG method=").append(method);
- if (startTime != null) {
- sb.append(" start=").append(startTime);
- }
- sb.append(" end=").append(endTime);
- if (startTime != null) {
- sb.append(" duration=").append(duration);
- }
- sb.append(" from=").append(callerName);
- if (additionalInfo != null) {
- sb.append(" ").append(additionalInfo);
- }
- sb.append(">");
- LOG.debug(sb.toString());
- }
- endMetrics(method);
- return duration;
- }
-
- public Long getStartTime(String method) {
- long startTime = 0L;
-
- if (startTimes.containsKey(method)) {
- startTime = startTimes.get(method);
- }
- return startTime;
- }
-
- public Long getEndTime(String method) {
- long endTime = 0L;
-
- if (endTimes.containsKey(method)) {
- endTime = endTimes.get(method);
- }
- return endTime;
- }
-
- public boolean startTimeHasMethod(String method) {
- return startTimes.containsKey(method);
- }
-
- public boolean endTimeHasMethod(String method) {
- return endTimes.containsKey(method);
- }
-
- public Long getDuration(String method) {
- long duration = 0;
- if (startTimes.containsKey(method) && endTimes.containsKey(method)) {
- duration = endTimes.get(method) - startTimes.get(method);
- }
- return duration;
- }
-
-
- public ImmutableMap<String, Long> getStartTimes() {
- return ImmutableMap.copyOf(startTimes);
- }
-
- public ImmutableMap<String, Long> getEndTimes() {
- return ImmutableMap.copyOf(endTimes);
- }
-
- //Methods for metrics integration. Each thread-local PerfLogger will open/close scope during each perf-log method.
- protected transient Map<String, Timer.Context> timerContexts = new HashMap<>();
-
- private void beginMetrics(String method) {
- Timer timer = Metrics.getOrCreateTimer(MetricsConstants.API_PREFIX + method);
- if (timer != null) {
- timerContexts.put(method, timer.time());
- }
-
- }
-
- private void endMetrics(String method) {
- Timer.Context context = timerContexts.remove(method);
- if (context != null) {
- context.close();
- }
- }
-
- /**
- * Cleans up any dangling perfLog metric call scopes.
- */
- public void cleanupPerfLogMetrics() {
- for (Timer.Context context : timerContexts.values()) {
- context.close();
- }
- timerContexts.clear();
- }
-}
http://git-wip-us.apache.org/repos/asf/hive/blob/081fa368/standalone-metastore/metastore-common/src/main/java/org/apache/hadoop/hive/metastore/model/MCatalog.java
----------------------------------------------------------------------
diff --git a/standalone-metastore/metastore-common/src/main/java/org/apache/hadoop/hive/metastore/model/MCatalog.java b/standalone-metastore/metastore-common/src/main/java/org/apache/hadoop/hive/metastore/model/MCatalog.java
deleted file mode 100644
index e82cb43..0000000
--- a/standalone-metastore/metastore-common/src/main/java/org/apache/hadoop/hive/metastore/model/MCatalog.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
- * <p>
- * http://www.apache.org/licenses/LICENSE-2.0
- * <p>
- * 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.model;
-
-public class MCatalog {
- private String name;
- private String description;
- private String locationUri;
-
- public MCatalog() {
-
- }
-
- public MCatalog(String name, String description, String locationUri) {
- this.name = name;
- this.description = description;
- this.locationUri = locationUri;
- }
-
- public String getName() {
- return name;
- }
-
- public void setName(String name) {
- this.name = name;
- }
-
- public String getDescription() {
- return description;
- }
-
- public void setDescription(String description) {
- this.description = description;
- }
-
- public String getLocationUri() {
- return locationUri;
- }
-
- public void setLocationUri(String locationUri) {
- this.locationUri = locationUri;
- }
-}
http://git-wip-us.apache.org/repos/asf/hive/blob/081fa368/standalone-metastore/metastore-common/src/main/java/org/apache/hadoop/hive/metastore/model/MColumnDescriptor.java
----------------------------------------------------------------------
diff --git a/standalone-metastore/metastore-common/src/main/java/org/apache/hadoop/hive/metastore/model/MColumnDescriptor.java b/standalone-metastore/metastore-common/src/main/java/org/apache/hadoop/hive/metastore/model/MColumnDescriptor.java
deleted file mode 100644
index a776e48..0000000
--- a/standalone-metastore/metastore-common/src/main/java/org/apache/hadoop/hive/metastore/model/MColumnDescriptor.java
+++ /dev/null
@@ -1,51 +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.model;
-
-import java.util.List;
-
-/**
- *
- * MColumnDescriptor.
- * A wrapper around a list of columns.
- */
-public class MColumnDescriptor {
- private List<MFieldSchema> cols;
-
- public MColumnDescriptor() {}
-
- /**
- *
- * @param cols
- */
- public MColumnDescriptor(List<MFieldSchema> cols) {
- this.cols = cols;
- }
-
- public List<MFieldSchema> getCols() {
- return cols;
- }
-
- public void setCols(List<MFieldSchema> cols) {
- this.cols = cols;
- }
-}
http://git-wip-us.apache.org/repos/asf/hive/blob/081fa368/standalone-metastore/metastore-common/src/main/java/org/apache/hadoop/hive/metastore/model/MConstraint.java
----------------------------------------------------------------------
diff --git a/standalone-metastore/metastore-common/src/main/java/org/apache/hadoop/hive/metastore/model/MConstraint.java b/standalone-metastore/metastore-common/src/main/java/org/apache/hadoop/hive/metastore/model/MConstraint.java
deleted file mode 100644
index 47877d5..0000000
--- a/standalone-metastore/metastore-common/src/main/java/org/apache/hadoop/hive/metastore/model/MConstraint.java
+++ /dev/null
@@ -1,214 +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.model;
-
-import java.io.Serializable;
-
-public class MConstraint
-{
- String constraintName;
- int constraintType;
- int position;
- Integer deleteRule;
- Integer updateRule;
- MTable parentTable;
- MTable childTable;
- MColumnDescriptor parentColumn;
- MColumnDescriptor childColumn;
- Integer childIntegerIndex;
- Integer parentIntegerIndex;
- int enableValidateRely;
- String defaultValue;
-
- // 0 - Primary Key
- // 1 - PK-FK relationship
- // 2 - Unique Constraint
- // 3 - Not Null Constraint
- public final static int PRIMARY_KEY_CONSTRAINT = 0;
- public final static int FOREIGN_KEY_CONSTRAINT = 1;
- public final static int UNIQUE_CONSTRAINT = 2;
- public final static int NOT_NULL_CONSTRAINT = 3;
- public final static int DEFAULT_CONSTRAINT = 4;
- public final static int CHECK_CONSTRAINT = 5;
-
- @SuppressWarnings("serial")
- public static class PK implements Serializable {
- public String constraintName;
- public int position;
-
- public PK() {}
-
- public PK(String constraintName, int position) {
- this.constraintName = constraintName;
- this.position = position;
- }
-
- public String toString() {
- return constraintName+":"+position;
- }
-
- public int hashCode() {
- return toString().hashCode();
- }
-
- public boolean equals(Object other) {
- if (other != null && (other instanceof PK)) {
- PK otherPK = (PK) other;
- return otherPK.constraintName.equals(constraintName) && otherPK.position == position;
- }
- return false;
- }
- }
-
- public MConstraint() {}
-
- public MConstraint(String constraintName, int constraintType, int position, Integer deleteRule, Integer updateRule, int enableRelyValidate, MTable parentTable,
- MTable childTable, MColumnDescriptor parentColumn, MColumnDescriptor childColumn, Integer childIntegerIndex, Integer parentIntegerIndex) {
- this.constraintName = constraintName;
- this.constraintType = constraintType;
- this.parentTable = parentTable;
- this.childTable = childTable;
- this.parentColumn = parentColumn;
- this.childColumn = childColumn;
- this.position = position;
- this.deleteRule = deleteRule;
- this.updateRule = updateRule;
- this.enableValidateRely = enableRelyValidate;
- this.childIntegerIndex = childIntegerIndex;
- this.parentIntegerIndex = parentIntegerIndex;
- }
-
- public MConstraint(String constraintName, int constraintType, int position, Integer deleteRule, Integer updateRule,
- int enableRelyValidate, MTable parentTable, MTable childTable, MColumnDescriptor parentColumn,
- MColumnDescriptor childColumn, Integer childIntegerIndex, Integer parentIntegerIndex, String defaultValue) {
- this.constraintName = constraintName;
- this.constraintType = constraintType;
- this.parentTable = parentTable;
- this.childTable = childTable;
- this.parentColumn = parentColumn;
- this.childColumn = childColumn;
- this.position = position;
- this.deleteRule = deleteRule;
- this.updateRule = updateRule;
- this.enableValidateRely = enableRelyValidate;
- this.childIntegerIndex = childIntegerIndex;
- this.parentIntegerIndex = parentIntegerIndex;
- this.defaultValue = defaultValue;
- }
-
- public String getDefaultOrCheckValue() { return defaultValue; }
-
- public void setDefaultOrCheckValue(String defaultOrCheckValue) {
- this.defaultValue= defaultOrCheckValue;
- }
- public String getConstraintName() {
- return constraintName;
- }
-
- public void setConstraintName(String fkName) {
- this.constraintName = fkName;
- }
-
- public int getConstraintType() {
- return constraintType;
- }
-
- public void setConstraintType(int ct) {
- this.constraintType = ct;
- }
-
- public int getPosition() {
- return position;
- }
-
- public void setPosition(int po) {
- this.position = po;
- }
-
- public Integer getDeleteRule() {
- return deleteRule;
- }
-
- public void setDeleteRule(Integer de) {
- this.deleteRule = de;
- }
-
- public int getEnableValidateRely() {
- return enableValidateRely;
- }
-
- public void setEnableValidateRely(int enableValidateRely) {
- this.enableValidateRely = enableValidateRely;
- }
-
- public Integer getChildIntegerIndex() {
- return childIntegerIndex;
- }
-
- public void setChildIntegerIndex(Integer childIntegerIndex) {
- this.childIntegerIndex = childIntegerIndex;
- }
-
- public Integer getParentIntegerIndex() {
- return parentIntegerIndex;
- }
-
- public void setParentIntegerIndex(Integer parentIntegerIndex) {
- this.parentIntegerIndex = parentIntegerIndex;
- }
-
- public Integer getUpdateRule() {
- return updateRule;
- }
-
- public void setUpdateRule(Integer ur) {
- this.updateRule = ur;
- }
-
- public MTable getChildTable() {
- return childTable;
- }
-
- public void setChildTable(MTable ft) {
- this.childTable = ft;
- }
-
- public MTable getParentTable() {
- return parentTable;
- }
-
- public void setParentTable(MTable pt) {
- this.parentTable = pt;
- }
-
- public MColumnDescriptor getParentColumn() {
- return parentColumn;
- }
-
- public void setParentColumn(MColumnDescriptor name) {
- this.parentColumn = name;
- }
-
- public MColumnDescriptor getChildColumn() {
- return childColumn;
- }
-
- public void setChildColumn(MColumnDescriptor name) {
- this.childColumn = name;
- }
-}
http://git-wip-us.apache.org/repos/asf/hive/blob/081fa368/standalone-metastore/metastore-common/src/main/java/org/apache/hadoop/hive/metastore/model/MCreationMetadata.java
----------------------------------------------------------------------
diff --git a/standalone-metastore/metastore-common/src/main/java/org/apache/hadoop/hive/metastore/model/MCreationMetadata.java b/standalone-metastore/metastore-common/src/main/java/org/apache/hadoop/hive/metastore/model/MCreationMetadata.java
deleted file mode 100644
index 2d65126..0000000
--- a/standalone-metastore/metastore-common/src/main/java/org/apache/hadoop/hive/metastore/model/MCreationMetadata.java
+++ /dev/null
@@ -1,97 +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.model;
-
-import java.util.Set;
-
-/**
- * Represents the creation metadata of a materialization.
- * It includes the database and table name for the materialization,
- * the set of tables that it uses, the valid transaction list
- * when it was created, and the creation/rebuild time.
- */
-public class MCreationMetadata {
-
- private String catalogName;
- private String dbName;
- private String tblName;
- private Set<MTable> tables;
- private String txnList;
- private long materializationTime;
-
- public MCreationMetadata() {
- }
-
- public MCreationMetadata(String catName, String dbName, String tblName,
- Set<MTable> tables, String txnList, long materializationTime) {
- this.catalogName = catName;
- this.dbName = dbName;
- this.tblName = tblName;
- this.tables = tables;
- this.txnList = txnList;
- this.materializationTime = materializationTime;
- }
-
- public Set<MTable> getTables() {
- return tables;
- }
-
- public void setTables(Set<MTable> tables) {
- this.tables = tables;
- }
-
- public String getTxnList() {
- return txnList;
- }
-
- public void setTxnList(String txnList) {
- this.txnList = txnList;
- }
-
- public String getCatalogName() {
- return catalogName;
- }
-
- public void setCatalogName(String catName) {
- this.catalogName = catName;
- }
-
- public String getDbName() {
- return dbName;
- }
-
- public void setDbName(String dbName) {
- this.dbName = dbName;
- }
-
- public String getTblName() {
- return tblName;
- }
-
- public void setTblName(String tblName) {
- this.tblName = tblName;
- }
-
- public long getMaterializationTime() {
- return materializationTime;
- }
-
- public void setMaterializationTime(long materializationTime) {
- this.materializationTime = materializationTime;
- }
-}
http://git-wip-us.apache.org/repos/asf/hive/blob/081fa368/standalone-metastore/metastore-common/src/main/java/org/apache/hadoop/hive/metastore/model/MDBPrivilege.java
----------------------------------------------------------------------
diff --git a/standalone-metastore/metastore-common/src/main/java/org/apache/hadoop/hive/metastore/model/MDBPrivilege.java b/standalone-metastore/metastore-common/src/main/java/org/apache/hadoop/hive/metastore/model/MDBPrivilege.java
deleted file mode 100644
index 5f51692..0000000
--- a/standalone-metastore/metastore-common/src/main/java/org/apache/hadoop/hive/metastore/model/MDBPrivilege.java
+++ /dev/null
@@ -1,142 +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.model;
-
-public class MDBPrivilege {
-
- private String principalName;
-
- private String principalType;
-
- private MDatabase database;
-
- private int createTime;
-
- private String privilege;
-
- private String grantor;
-
- private String grantorType;
-
- private boolean grantOption;
-
- private String authorizer;
-
- public MDBPrivilege() {
- }
-
- public MDBPrivilege(String principalName, String principalType,
- MDatabase database, String dbPrivileges, int createTime, String grantor,
- String grantorType, boolean grantOption, String authorizer) {
- super();
- this.principalName = principalName;
- this.principalType = principalType;
- this.database = database;
- this.privilege = dbPrivileges;
- this.createTime = createTime;
- this.grantorType = grantorType;
- this.grantOption = grantOption;
- this.grantor = grantor;
- this.authorizer = authorizer;
- }
-
- /**
- * @return user name, role name, or group name
- */
- public String getPrincipalName() {
- return principalName;
- }
-
- /**
- * @param userName user/role/group name
- */
- public void setPrincipalName(String userName) {
- this.principalName = userName;
- }
-
- /**
- * @return a set of privileges this user/role/group has
- */
- public String getPrivilege() {
- return privilege;
- }
-
- /**
- * @param dbPrivilege a set of privileges this user/role/group has
- */
- public void setPrivilege(String dbPrivilege) {
- this.privilege = dbPrivilege;
- }
-
- public MDatabase getDatabase() {
- return database;
- }
-
- public void setDatabase(MDatabase database) {
- this.database = database;
- }
-
- public int getCreateTime() {
- return createTime;
- }
-
- public void setCreateTime(int createTime) {
- this.createTime = createTime;
- }
-
- public String getGrantor() {
- return grantor;
- }
-
- public void setGrantor(String grantor) {
- this.grantor = grantor;
- }
-
- public String getGrantorType() {
- return grantorType;
- }
-
- public void setGrantorType(String grantorType) {
- this.grantorType = grantorType;
- }
-
- public boolean getGrantOption() {
- return grantOption;
- }
-
- public void setGrantOption(boolean grantOption) {
- this.grantOption = grantOption;
- }
-
- public String getPrincipalType() {
- return principalType;
- }
-
- public void setPrincipalType(String principalType) {
- this.principalType = principalType;
- }
-
- public String getAuthorizer() {
- return authorizer;
- }
-
- public void setAuthorizer(String authorizer) {
- this.authorizer = authorizer;
- }
-}
http://git-wip-us.apache.org/repos/asf/hive/blob/081fa368/standalone-metastore/metastore-common/src/main/java/org/apache/hadoop/hive/metastore/model/MDatabase.java
----------------------------------------------------------------------
diff --git a/standalone-metastore/metastore-common/src/main/java/org/apache/hadoop/hive/metastore/model/MDatabase.java b/standalone-metastore/metastore-common/src/main/java/org/apache/hadoop/hive/metastore/model/MDatabase.java
deleted file mode 100644
index 815b39c..0000000
--- a/standalone-metastore/metastore-common/src/main/java/org/apache/hadoop/hive/metastore/model/MDatabase.java
+++ /dev/null
@@ -1,157 +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.model;
-
-import org.apache.hadoop.hive.metastore.ReplChangeManager;
-
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.Map;
-import java.util.Set;
-
-/**
- * Storage Class representing the Hive MDatabase in a rdbms
- *
- */
-public class MDatabase {
- private String name;
- private String locationUri;
- private String description;
- private Map<String, String> parameters;
- private String ownerName;
- private String ownerType;
- private String catalogName;
-
- /**
- * Default construction to keep jpox/jdo happy
- */
- public MDatabase() {}
-
- /**
- * To create a database object
- * @param name of the database
- * @param locationUri Location of the database in the warehouse
- * @param description Comment describing the database
- */
- public MDatabase(String catalogName, String name, String locationUri, String description,
- Map<String, String> parameters) {
- this.name = name;
- this.locationUri = locationUri;
- this.description = description;
- this.parameters = parameters;
- this.catalogName = catalogName;
- }
-
- /**
- * @return the name
- */
- public String getName() {
- return name;
- }
-
- /**
- * @param name the name to set
- */
- public void setName(String name) {
- this.name = name;
- }
-
- /**
- * @return the location_uri
- */
- public String getLocationUri() {
- return locationUri;
- }
-
- /**
- * @param locationUri the locationUri to set
- */
- public void setLocationUri(String locationUri) {
- this.locationUri = locationUri;
- }
-
- /**
- * @return the description
- */
- public String getDescription() {
- return description;
- }
-
- /**
- * @param description the description to set
- */
- public void setDescription(String description) {
- this.description = description;
- }
-
- /**
- * @return the parameters mapping.
- */
- public Map<String, String> getParameters() {
- return parameters;
- }
-
- /**
- * @param parameters the parameters mapping.
- */
- public void setParameters(Map<String, String> parameters) {
- if (parameters == null) {
- this.parameters = null;
- return;
- }
- this.parameters = new HashMap<>();
- Set<String> keys = new HashSet<>(parameters.keySet());
- for(String key : keys) {
- // Normalize the case for source of replication parameter
- if (ReplChangeManager.SOURCE_OF_REPLICATION.equalsIgnoreCase(key)) {
- // TODO : Some extra validation can also be added as this is a user provided parameter.
- this.parameters.put(ReplChangeManager.SOURCE_OF_REPLICATION, parameters.get(key));
- } else {
- this.parameters.put(key, parameters.get(key));
- }
- }
- }
-
- public String getOwnerName() {
- return ownerName;
- }
-
- public void setOwnerName(String ownerName) {
- this.ownerName = ownerName;
- }
-
- public String getOwnerType() {
- return ownerType;
- }
-
- public void setOwnerType(String ownerType) {
- this.ownerType = ownerType;
- }
-
- public String getCatalogName() {
- return catalogName;
- }
-
- public void setCatalogName(String catalogName) {
- this.catalogName = catalogName;
- }
-}
http://git-wip-us.apache.org/repos/asf/hive/blob/081fa368/standalone-metastore/metastore-common/src/main/java/org/apache/hadoop/hive/metastore/model/MDelegationToken.java
----------------------------------------------------------------------
diff --git a/standalone-metastore/metastore-common/src/main/java/org/apache/hadoop/hive/metastore/model/MDelegationToken.java b/standalone-metastore/metastore-common/src/main/java/org/apache/hadoop/hive/metastore/model/MDelegationToken.java
deleted file mode 100644
index e6cc201..0000000
--- a/standalone-metastore/metastore-common/src/main/java/org/apache/hadoop/hive/metastore/model/MDelegationToken.java
+++ /dev/null
@@ -1,45 +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.model;
-
-public class MDelegationToken {
-
- private String tokenStr;
- private String tokenIdentifier;
-
- public MDelegationToken(String tokenIdentifier, String tokenStr) {
- super();
- this.tokenStr = tokenStr;
- this.tokenIdentifier = tokenIdentifier;
- }
-
- public String getTokenStr() {
- return tokenStr;
- }
- public void setTokenStr(String tokenStr) {
- this.tokenStr = tokenStr;
- }
- public String getTokenIdentifier() {
- return tokenIdentifier;
- }
- public void setTokenIdentifier(String tokenIdentifier) {
- this.tokenIdentifier = tokenIdentifier;
- }
-
-}
http://git-wip-us.apache.org/repos/asf/hive/blob/081fa368/standalone-metastore/metastore-common/src/main/java/org/apache/hadoop/hive/metastore/model/MFieldSchema.java
----------------------------------------------------------------------
diff --git a/standalone-metastore/metastore-common/src/main/java/org/apache/hadoop/hive/metastore/model/MFieldSchema.java b/standalone-metastore/metastore-common/src/main/java/org/apache/hadoop/hive/metastore/model/MFieldSchema.java
deleted file mode 100644
index 05117bd..0000000
--- a/standalone-metastore/metastore-common/src/main/java/org/apache/hadoop/hive/metastore/model/MFieldSchema.java
+++ /dev/null
@@ -1,80 +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.model;
-
-/**
- * Represent a column or a type of a table or object
- */
-public class MFieldSchema {
- private String name;
- private String type;
- private String comment;
- public MFieldSchema() {}
-
- /**
- * @param comment
- * @param name
- * @param type
- */
- public MFieldSchema(String name, String type, String comment) {
- this.comment = comment;
- this.name = name;
- this.type = type;
- }
- /**
- * @return the name
- */
- public String getName() {
- return name;
- }
- /**
- * @param name the name to set
- */
- public void setName(String name) {
- this.name = name;
- }
- /**
- * @return the comment
- */
- public String getComment() {
- return comment;
- }
- /**
- * @param comment the comment to set
- */
- public void setComment(String comment) {
- this.comment = comment;
- }
- /**
- * @return the type
- */
- public String getType() {
- return type;
- }
- /**
- * @param field the type to set
- */
- public void setType(String field) {
- this.type = field;
- }
-
-}
http://git-wip-us.apache.org/repos/asf/hive/blob/081fa368/standalone-metastore/metastore-common/src/main/java/org/apache/hadoop/hive/metastore/model/MFunction.java
----------------------------------------------------------------------
diff --git a/standalone-metastore/metastore-common/src/main/java/org/apache/hadoop/hive/metastore/model/MFunction.java b/standalone-metastore/metastore-common/src/main/java/org/apache/hadoop/hive/metastore/model/MFunction.java
deleted file mode 100644
index 8a4f1db..0000000
--- a/standalone-metastore/metastore-common/src/main/java/org/apache/hadoop/hive/metastore/model/MFunction.java
+++ /dev/null
@@ -1,119 +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.model;
-
-import org.apache.hadoop.hive.metastore.api.PrincipalType;
-import java.util.List;
-
-public class MFunction {
-
- private String functionName;
- private MDatabase database;
- private String className;
- private String ownerName;
- private String ownerType;
- private int createTime;
- private int functionType;
- private List<MResourceUri> resourceUris;
-
- public MFunction() {
- }
-
- public MFunction(String functionName,
- MDatabase database,
- String className,
- String ownerName,
- String ownerType,
- int createTime,
- int functionType,
- List<MResourceUri> resourceUris) {
- this.setFunctionName(functionName);
- this.setDatabase(database);
- this.setFunctionType(functionType);
- this.setClassName(className);
- this.setOwnerName(ownerName);
- this.setOwnerType(ownerType);
- this.setCreateTime(createTime);
- this.setResourceUris(resourceUris);
- }
-
- public String getFunctionName() {
- return functionName;
- }
-
- public void setFunctionName(String functionName) {
- this.functionName = functionName;
- }
-
- public MDatabase getDatabase() {
- return database;
- }
-
- public void setDatabase(MDatabase database) {
- this.database = database;
- }
-
- public String getClassName() {
- return className;
- }
-
- public void setClassName(String className) {
- this.className = className;
- }
-
- public String getOwnerName() {
- return ownerName;
- }
-
- public void setOwnerName(String owner) {
- this.ownerName = owner;
- }
-
- public String getOwnerType() {
- return ownerType;
- }
-
- public void setOwnerType(String ownerType) {
- this.ownerType = ownerType;
- }
-
- public int getCreateTime() {
- return createTime;
- }
-
- public void setCreateTime(int createTime) {
- this.createTime = createTime;
- }
-
- public int getFunctionType() {
- return functionType;
- }
-
- public void setFunctionType(int functionType) {
- this.functionType = functionType;
- }
-
- public List<MResourceUri> getResourceUris() {
- return resourceUris;
- }
-
- public void setResourceUris(List<MResourceUri> resourceUris) {
- this.resourceUris = resourceUris;
- }
-}
http://git-wip-us.apache.org/repos/asf/hive/blob/081fa368/standalone-metastore/metastore-common/src/main/java/org/apache/hadoop/hive/metastore/model/MGlobalPrivilege.java
----------------------------------------------------------------------
diff --git a/standalone-metastore/metastore-common/src/main/java/org/apache/hadoop/hive/metastore/model/MGlobalPrivilege.java b/standalone-metastore/metastore-common/src/main/java/org/apache/hadoop/hive/metastore/model/MGlobalPrivilege.java
deleted file mode 100644
index a6ce541..0000000
--- a/standalone-metastore/metastore-common/src/main/java/org/apache/hadoop/hive/metastore/model/MGlobalPrivilege.java
+++ /dev/null
@@ -1,130 +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.model;
-
-/**
- * User global level privileges
- */
-public class MGlobalPrivilege {
-
- //principal name, can be a user, group, or role
- private String principalName;
-
- private String principalType;
-
- private String privilege;
-
- private int createTime;
-
- private String grantor;
-
- private String grantorType;
-
- private boolean grantOption;
-
- private String authorizer;
-
- public MGlobalPrivilege() {
- super();
- }
-
- public MGlobalPrivilege(String userName, String principalType,
- String dbPrivilege, int createTime, String grantor, String grantorType,
- boolean grantOption, String authorizer) {
- super();
- this.principalName = userName;
- this.principalType = principalType;
- this.privilege = dbPrivilege;
- this.createTime = createTime;
- this.grantor = grantor;
- this.grantorType = grantorType;
- this.grantOption = grantOption;
- this.authorizer = authorizer;
- }
-
- /**
- * @return a set of global privileges granted to this user
- */
- public String getPrivilege() {
- return privilege;
- }
-
- /**
- * @param dbPrivilege set of global privileges to user
- */
- public void setPrivilege(String dbPrivilege) {
- this.privilege = dbPrivilege;
- }
-
- public String getPrincipalName() {
- return principalName;
- }
-
- public void setPrincipalName(String principalName) {
- this.principalName = principalName;
- }
-
- public int getCreateTime() {
- return createTime;
- }
-
- public void setCreateTime(int createTime) {
- this.createTime = createTime;
- }
-
- public String getGrantor() {
- return grantor;
- }
-
- public void setGrantor(String grantor) {
- this.grantor = grantor;
- }
-
- public boolean getGrantOption() {
- return grantOption;
- }
-
- public void setGrantOption(boolean grantOption) {
- this.grantOption = grantOption;
- }
-
- public String getPrincipalType() {
- return principalType;
- }
-
- public void setPrincipalType(String principalType) {
- this.principalType = principalType;
- }
-
- public String getGrantorType() {
- return grantorType;
- }
-
- public void setGrantorType(String grantorType) {
- this.grantorType = grantorType;
- }
-
- public String getAuthorizer() {
- return authorizer;
- }
-
- public void setAuthorizer(String authorizer) {
- this.authorizer = authorizer;
- }
-}
http://git-wip-us.apache.org/repos/asf/hive/blob/081fa368/standalone-metastore/metastore-common/src/main/java/org/apache/hadoop/hive/metastore/model/MISchema.java
----------------------------------------------------------------------
diff --git a/standalone-metastore/metastore-common/src/main/java/org/apache/hadoop/hive/metastore/model/MISchema.java b/standalone-metastore/metastore-common/src/main/java/org/apache/hadoop/hive/metastore/model/MISchema.java
deleted file mode 100644
index e64b0e9..0000000
--- a/standalone-metastore/metastore-common/src/main/java/org/apache/hadoop/hive/metastore/model/MISchema.java
+++ /dev/null
@@ -1,107 +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
- * <p>
- * http://www.apache.org/licenses/LICENSE-2.0
- * <p>
- * 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.model;
-
-public class MISchema {
- private int schemaType;
- private String name;
- private MDatabase db;
- private int compatibility;
- private int validationLevel;
- private boolean canEvolve;
- private String schemaGroup;
- private String description;
-
- public MISchema(int schemaType, String name, MDatabase db, int compatibility,
- int validationLevel, boolean canEvolve, String schemaGroup, String description) {
- this.schemaType = schemaType;
- this.name = name;
- this.db= db;
- this.compatibility = compatibility;
- this.validationLevel = validationLevel;
- this.canEvolve = canEvolve;
- this.schemaGroup = schemaGroup;
- this.description = description;
- }
-
- public int getSchemaType() {
- return schemaType;
- }
-
- public void setSchemaType(int schemaType) {
- this.schemaType = schemaType;
- }
-
- public String getName() {
- return name;
- }
-
- public void setName(String name) {
- this.name = name;
- }
-
- public MDatabase getDb() {
- return db;
- }
-
- public MISchema setDb(MDatabase db) {
- this.db = db;
- return this;
- }
-
- public int getCompatibility() {
- return compatibility;
- }
-
- public void setCompatibility(int compatibility) {
- this.compatibility = compatibility;
- }
-
- public int getValidationLevel() {
- return validationLevel;
- }
-
- public void setValidationLevel(int validationLevel) {
- this.validationLevel = validationLevel;
- }
-
- public boolean getCanEvolve() {
- return canEvolve;
- }
-
- public void setCanEvolve(boolean canEvolve) {
- this.canEvolve = canEvolve;
- }
-
- public String getSchemaGroup() {
- return schemaGroup;
- }
-
- public void setSchemaGroup(String schemaGroup) {
- this.schemaGroup = schemaGroup;
- }
-
- public String getDescription() {
- return description;
- }
-
- public void setDescription(String description) {
- this.description = description;
- }
-}
-
http://git-wip-us.apache.org/repos/asf/hive/blob/081fa368/standalone-metastore/metastore-common/src/main/java/org/apache/hadoop/hive/metastore/model/MIndex.java
----------------------------------------------------------------------
diff --git a/standalone-metastore/metastore-common/src/main/java/org/apache/hadoop/hive/metastore/model/MIndex.java b/standalone-metastore/metastore-common/src/main/java/org/apache/hadoop/hive/metastore/model/MIndex.java
deleted file mode 100644
index 1d67961..0000000
--- a/standalone-metastore/metastore-common/src/main/java/org/apache/hadoop/hive/metastore/model/MIndex.java
+++ /dev/null
@@ -1,200 +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.model;
-
-import java.util.Map;
-
-/**
- * Represents hive's index definition.
- */
-public class MIndex {
-
- private String indexName;
- private MTable origTable;
- private int createTime;
- private int lastAccessTime;
- private Map<String, String> parameters;
- private MTable indexTable;
- private MStorageDescriptor sd;
- private String indexHandlerClass;
- private boolean deferredRebuild;
-
- public MIndex() {}
-
-/**
- * @param indexName
- * @param baseTable
- * @param createTime
- * @param lastAccessTime
- * @param parameters
- * @param indexTable
- * @param sd
- * @param indexHandlerClass
- * @param deferredRebuild
- */
- public MIndex(String indexName, MTable baseTable, int createTime,
- int lastAccessTime, Map<String, String> parameters, MTable indexTable,
- MStorageDescriptor sd, String indexHandlerClass, boolean deferredRebuild) {
- super();
- this.indexName = indexName;
- this.origTable = baseTable;
- this.createTime = createTime;
- this.lastAccessTime = lastAccessTime;
- this.parameters = parameters;
- this.indexTable = indexTable;
- this.sd = sd;
- this.indexHandlerClass = indexHandlerClass;
- this.deferredRebuild = deferredRebuild;
- }
-
-
-
- /**
- * @return index name
- */
- public String getIndexName() {
- return indexName;
- }
-
- /**
- * @param indexName index name
- */
- public void setIndexName(String indexName) {
- this.indexName = indexName;
- }
-
- /**
- * @return create time
- */
- public int getCreateTime() {
- return createTime;
- }
-
- /**
- * @param createTime create time
- */
- public void setCreateTime(int createTime) {
- this.createTime = createTime;
- }
-
- /**
- * @return last access time
- */
- public int getLastAccessTime() {
- return lastAccessTime;
- }
-
- /**
- * @param lastAccessTime last access time
- */
- public void setLastAccessTime(int lastAccessTime) {
- this.lastAccessTime = lastAccessTime;
- }
-
- /**
- * @return parameters
- */
- public Map<String, String> getParameters() {
- return parameters;
- }
-
- /**
- * @param parameters parameters
- */
- public void setParameters(Map<String, String> parameters) {
- this.parameters = parameters;
- }
-
- /**
- * @return original table
- */
- public MTable getOrigTable() {
- return origTable;
- }
-
- /**
- * @param origTable
- */
- public void setOrigTable(MTable origTable) {
- this.origTable = origTable;
- }
-
- /**
- * @return index table
- */
- public MTable getIndexTable() {
- return indexTable;
- }
-
- /**
- * @param indexTable
- */
- public void setIndexTable(MTable indexTable) {
- this.indexTable = indexTable;
- }
-
- /**
- * @return storage descriptor
- */
- public MStorageDescriptor getSd() {
- return sd;
- }
-
- /**
- * @param sd
- */
- public void setSd(MStorageDescriptor sd) {
- this.sd = sd;
- }
-
- /**
- * @return indexHandlerClass
- */
- public String getIndexHandlerClass() {
- return indexHandlerClass;
- }
-
- /**
- * @param indexHandlerClass
- */
- public void setIndexHandlerClass(String indexHandlerClass) {
- this.indexHandlerClass = indexHandlerClass;
- }
-
- /**
- * @return auto rebuild
- */
- public boolean isDeferredRebuild() {
- return deferredRebuild;
- }
-
- /**
- * @return auto rebuild
- */
- public boolean getDeferredRebuild() {
- return deferredRebuild;
- }
-
- /**
- * @param deferredRebuild
- */
- public void setDeferredRebuild(boolean deferredRebuild) {
- this.deferredRebuild = deferredRebuild;
- }
-}
http://git-wip-us.apache.org/repos/asf/hive/blob/081fa368/standalone-metastore/metastore-common/src/main/java/org/apache/hadoop/hive/metastore/model/MMasterKey.java
----------------------------------------------------------------------
diff --git a/standalone-metastore/metastore-common/src/main/java/org/apache/hadoop/hive/metastore/model/MMasterKey.java b/standalone-metastore/metastore-common/src/main/java/org/apache/hadoop/hive/metastore/model/MMasterKey.java
deleted file mode 100644
index 7ca8579..0000000
--- a/standalone-metastore/metastore-common/src/main/java/org/apache/hadoop/hive/metastore/model/MMasterKey.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.model;
-
-public class MMasterKey {
-
- public MMasterKey(int keyId, String masterKey) {
- this.keyId = keyId;
- this.masterKey = masterKey;
- }
-
- private int keyId;
- private String masterKey;
-
- public MMasterKey(String masterKey) {
- this.masterKey = masterKey;
- }
-
- public MMasterKey(int keyId) {
- this.keyId = keyId;
- }
-
- public String getMasterKey() {
- return masterKey;
- }
-
- public void setMasterKey(String masterKey) {
- this.masterKey = masterKey;
- }
-
- public int getKeyId() {
- return keyId;
- }
-
- public void setKeyId(int keyId) {
- this.keyId = keyId;
- }
-
-}
http://git-wip-us.apache.org/repos/asf/hive/blob/081fa368/standalone-metastore/metastore-common/src/main/java/org/apache/hadoop/hive/metastore/model/MMetastoreDBProperties.java
----------------------------------------------------------------------
diff --git a/standalone-metastore/metastore-common/src/main/java/org/apache/hadoop/hive/metastore/model/MMetastoreDBProperties.java b/standalone-metastore/metastore-common/src/main/java/org/apache/hadoop/hive/metastore/model/MMetastoreDBProperties.java
deleted file mode 100644
index 2966f40..0000000
--- a/standalone-metastore/metastore-common/src/main/java/org/apache/hadoop/hive/metastore/model/MMetastoreDBProperties.java
+++ /dev/null
@@ -1,56 +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.model;
-
-public class MMetastoreDBProperties {
- private String propertyKey;
- private String propertyValue;
- private String description;
-
- public MMetastoreDBProperties() {}
-
- public MMetastoreDBProperties(String propertykey, String propertyValue, String description) {
- this.propertyKey = propertykey;
- this.propertyValue = propertyValue;
- this.description = description;
- }
-
- public String getPropertykey() {
- return propertyKey;
- }
-
- public void setPropertykey(String propertykey) {
- this.propertyKey = propertykey;
- }
-
- public String getPropertyValue() {
- return propertyValue;
- }
-
- public void setPropertyValue(String propertyValue) {
- this.propertyValue = propertyValue;
- }
-
- public String getDescription() {
- return description;
- }
-
- public void setDescription(String description) {
- this.description = description;
- }
-}
http://git-wip-us.apache.org/repos/asf/hive/blob/081fa368/standalone-metastore/metastore-common/src/main/java/org/apache/hadoop/hive/metastore/model/MNotificationLog.java
----------------------------------------------------------------------
diff --git a/standalone-metastore/metastore-common/src/main/java/org/apache/hadoop/hive/metastore/model/MNotificationLog.java b/standalone-metastore/metastore-common/src/main/java/org/apache/hadoop/hive/metastore/model/MNotificationLog.java
deleted file mode 100644
index 60914ae..0000000
--- a/standalone-metastore/metastore-common/src/main/java/org/apache/hadoop/hive/metastore/model/MNotificationLog.java
+++ /dev/null
@@ -1,108 +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.model;
-
-public class MNotificationLog {
-
- private long eventId; // This is not the datanucleus id, but the id assigned by the sequence
- private int eventTime;
- private String eventType;
- private String catalogName;
- private String dbName;
- private String tableName;
- private String message;
- private String messageFormat;
-
- public MNotificationLog() {
- }
-
- public MNotificationLog(int eventId, String eventType, String catName, String dbName, String tableName,
- String message) {
- this.eventId = eventId;
- this.eventType = eventType;
- this.catalogName = catName;
- this.dbName = dbName;
- this.tableName = tableName;
- this.message = message;
- }
-
- public void setEventId(long eventId) {
- this.eventId = eventId;
- }
-
- public long getEventId() {
- return eventId;
-
- }
-
- public int getEventTime() {
- return eventTime;
- }
-
- public void setEventTime(int eventTime) {
- this.eventTime = eventTime;
- }
-
- public String getEventType() {
- return eventType;
- }
-
- public void setEventType(String eventType) {
- this.eventType = eventType;
- }
-
- public String getDbName() {
- return dbName;
- }
-
- public void setDbName(String dbName) {
- this.dbName = dbName;
- }
-
- public String getCatalogName() {
- return catalogName;
- }
-
- public void setCatalogName(String catName) {
- this.catalogName = catName;
- }
-
- public String getTableName() {
- return tableName;
- }
-
- public void setTableName(String tableName) {
- this.tableName = tableName;
- }
-
- public String getMessage() {
- return message;
- }
-
- public void setMessage(String message) {
- this.message = message;
- }
-
- public String getMessageFormat() {
- return messageFormat;
- }
-
- public void setMessageFormat(String messageFormat) {
- this.messageFormat = messageFormat;
- }
-}
http://git-wip-us.apache.org/repos/asf/hive/blob/081fa368/standalone-metastore/metastore-common/src/main/java/org/apache/hadoop/hive/metastore/model/MNotificationNextId.java
----------------------------------------------------------------------
diff --git a/standalone-metastore/metastore-common/src/main/java/org/apache/hadoop/hive/metastore/model/MNotificationNextId.java b/standalone-metastore/metastore-common/src/main/java/org/apache/hadoop/hive/metastore/model/MNotificationNextId.java
deleted file mode 100644
index 470b3db..0000000
--- a/standalone-metastore/metastore-common/src/main/java/org/apache/hadoop/hive/metastore/model/MNotificationNextId.java
+++ /dev/null
@@ -1,42 +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.model;
-
-public class MNotificationNextId {
-
- private long nextEventId;
-
- public MNotificationNextId() {
- }
-
- public MNotificationNextId(long nextEventId) {
- this.nextEventId = nextEventId;
- }
-
- public long getNextEventId() {
- return nextEventId;
- }
-
- public void setNextEventId(long nextEventId) {
- this.nextEventId = nextEventId;
- }
-
- public void incrementEventId() {
- nextEventId++;
- }
-}
http://git-wip-us.apache.org/repos/asf/hive/blob/081fa368/standalone-metastore/metastore-common/src/main/java/org/apache/hadoop/hive/metastore/model/MOrder.java
----------------------------------------------------------------------
diff --git a/standalone-metastore/metastore-common/src/main/java/org/apache/hadoop/hive/metastore/model/MOrder.java b/standalone-metastore/metastore-common/src/main/java/org/apache/hadoop/hive/metastore/model/MOrder.java
deleted file mode 100644
index 9dabc06..0000000
--- a/standalone-metastore/metastore-common/src/main/java/org/apache/hadoop/hive/metastore/model/MOrder.java
+++ /dev/null
@@ -1,62 +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.model;
-
-public class MOrder {
- private String col;
- private int order;
-
- /**
- * @param col
- * @param order
- */
- public MOrder(String col, int order) {
- this.col = col;
- this.order = order;
- }
-
- /**
- * @return the col
- */
- public String getCol() {
- return col;
- }
-
- /**
- * @param col the col to set
- */
- public void setCol(String col) {
- this.col = col;
- }
-
- /**
- * @return the order
- */
- public int getOrder() {
- return order;
- }
-
- /**
- * @param order the order to set
- */
- public void setOrder(int order) {
- this.order = order;
- }
-
-}
http://git-wip-us.apache.org/repos/asf/hive/blob/081fa368/standalone-metastore/metastore-common/src/main/java/org/apache/hadoop/hive/metastore/model/MPartition.java
----------------------------------------------------------------------
diff --git a/standalone-metastore/metastore-common/src/main/java/org/apache/hadoop/hive/metastore/model/MPartition.java b/standalone-metastore/metastore-common/src/main/java/org/apache/hadoop/hive/metastore/model/MPartition.java
deleted file mode 100644
index 4a97f89..0000000
--- a/standalone-metastore/metastore-common/src/main/java/org/apache/hadoop/hive/metastore/model/MPartition.java
+++ /dev/null
@@ -1,155 +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.model;
-
-import java.util.List;
-import java.util.Map;
-
-public class MPartition {
-
- private String partitionName; // partitionname ==> (key=value/)*(key=value)
- private MTable table;
- private List<String> values;
- private int createTime;
- private int lastAccessTime;
- private MStorageDescriptor sd;
- private Map<String, String> parameters;
-
-
- public MPartition() {}
-
- /**
- * @param partitionName
- * @param table
- * @param values
- * @param createTime
- * @param lastAccessTime
- * @param sd
- * @param parameters
- */
- public MPartition(String partitionName, MTable table, List<String> values, int createTime,
- int lastAccessTime, MStorageDescriptor sd, Map<String, String> parameters) {
- this.partitionName = partitionName;
- this.table = table;
- this.values = values;
- this.createTime = createTime;
- this.lastAccessTime = lastAccessTime;
- this.sd = sd;
- this.parameters = parameters;
- }
-
- /**
- * @return the lastAccessTime
- */
- public int getLastAccessTime() {
- return lastAccessTime;
- }
-
- /**
- * @param lastAccessTime the lastAccessTime to set
- */
- public void setLastAccessTime(int lastAccessTime) {
- this.lastAccessTime = lastAccessTime;
- }
-
- /**
- * @return the values
- */
- public List<String> getValues() {
- return values;
- }
-
- /**
- * @param values the values to set
- */
- public void setValues(List<String> values) {
- this.values = values;
- }
-
- /**
- * @return the table
- */
- public MTable getTable() {
- return table;
- }
-
- /**
- * @param table the table to set
- */
- public void setTable(MTable table) {
- this.table = table;
- }
-
- /**
- * @return the sd
- */
- public MStorageDescriptor getSd() {
- return sd;
- }
-
- /**
- * @param sd the sd to set
- */
- public void setSd(MStorageDescriptor sd) {
- this.sd = sd;
- }
-
- /**
- * @return the parameters
- */
- public Map<String, String> getParameters() {
- return parameters;
- }
-
- /**
- * @param parameters the parameters to set
- */
- public void setParameters(Map<String, String> parameters) {
- this.parameters = parameters;
- }
-
- /**
- * @return the partitionName
- */
- public String getPartitionName() {
- return partitionName;
- }
-
- /**
- * @param partitionName the partitionName to set
- */
- public void setPartitionName(String partitionName) {
- this.partitionName = partitionName;
- }
-
- /**
- * @return the createTime
- */
- public int getCreateTime() {
- return createTime;
- }
-
- /**
- * @param createTime the createTime to set
- */
- public void setCreateTime(int createTime) {
- this.createTime = createTime;
- }
-
-}
http://git-wip-us.apache.org/repos/asf/hive/blob/081fa368/standalone-metastore/metastore-common/src/main/java/org/apache/hadoop/hive/metastore/model/MPartitionColumnPrivilege.java
----------------------------------------------------------------------
diff --git a/standalone-metastore/metastore-common/src/main/java/org/apache/hadoop/hive/metastore/model/MPartitionColumnPrivilege.java b/standalone-metastore/metastore-common/src/main/java/org/apache/hadoop/hive/metastore/model/MPartitionColumnPrivilege.java
deleted file mode 100644
index cc87f75..0000000
--- a/standalone-metastore/metastore-common/src/main/java/org/apache/hadoop/hive/metastore/model/MPartitionColumnPrivilege.java
+++ /dev/null
@@ -1,171 +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.model;
-
-
-public class MPartitionColumnPrivilege {
-
- private String principalName;
-
- private String principalType;
-
- private MPartition partition;
-
- private String columnName;
-
- private String privilege;
-
- private int createTime;
-
- private String grantor;
-
- private String grantorType;
-
- private boolean grantOption;
-
- private String authorizer;
-
- public MPartitionColumnPrivilege() {
- }
-
- /**
- * @param principalName
- * @param principalType
- * @param partition
- * @param columnName
- * @param privileges
- * @param createTime
- * @param grantor
- * @param grantorType
- * @param grantOption
- * @param authorizer
- */
- public MPartitionColumnPrivilege(String principalName, String principalType,
- MPartition partition, String columnName, String privileges, int createTime,
- String grantor, String grantorType, boolean grantOption, String authorizer) {
- super();
- this.principalName = principalName;
- this.principalType = principalType;
- this.partition = partition;
- this.columnName = columnName;
- this.privilege = privileges;
- this.createTime = createTime;
- this.grantor = grantor;
- this.grantorType = grantorType;
- this.grantOption = grantOption;
- this.authorizer = authorizer;
- }
-
- /**
- * @return column name
- */
- public String getColumnName() {
- return columnName;
- }
-
- /**
- * @param columnName column name
- */
- public void setColumnName(String columnName) {
- this.columnName = columnName;
- }
-
- /**
- * @return a set of privileges this user/role/group has
- */
- public String getPrivilege() {
- return privilege;
- }
-
- /**
- * @param dbPrivileges a set of privileges this user/role/group has
- */
- public void setPrivilege(String dbPrivileges) {
- this.privilege = dbPrivileges;
- }
-
- /**
- * @return create time
- */
- public int getCreateTime() {
- return createTime;
- }
-
- /**
- * @param createTime create time
- */
- public void setCreateTime(int createTime) {
- this.createTime = createTime;
- }
-
- public String getPrincipalName() {
- return principalName;
- }
-
- public void setPrincipalName(String principalName) {
- this.principalName = principalName;
- }
-
- public MPartition getPartition() {
- return partition;
- }
-
- public void setPartition(MPartition partition) {
- this.partition = partition;
- }
-
- public String getGrantor() {
- return grantor;
- }
-
- public void setGrantor(String grantor) {
- this.grantor = grantor;
- }
-
- public String getGrantorType() {
- return grantorType;
- }
-
- public void setGrantorType(String grantorType) {
- this.grantorType = grantorType;
- }
-
- public boolean getGrantOption() {
- return grantOption;
- }
-
- public void setGrantOption(boolean grantOption) {
- this.grantOption = grantOption;
- }
-
- public String getPrincipalType() {
- return principalType;
- }
-
- public void setPrincipalType(String principalType) {
- this.principalType = principalType;
- }
- public String getAuthorizer() {
- return authorizer;
- }
-
- public void setAuthorizer(String authorizer) {
- this.authorizer = authorizer;
- }
-}