You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hive.apache.org by ha...@apache.org on 2014/01/18 18:18:59 UTC
svn commit: r1559367 [4/4] - in /hive/trunk: metastore/if/
metastore/src/gen/thrift/gen-cpp/
metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/
metastore/src/gen/thrift/gen-php/metastore/
metastore/src/gen/thrift/gen-py/hive_me...
Modified: hive/trunk/metastore/src/gen/thrift/gen-py/hive_metastore/ttypes.py
URL: http://svn.apache.org/viewvc/hive/trunk/metastore/src/gen/thrift/gen-py/hive_metastore/ttypes.py?rev=1559367&r1=1559366&r2=1559367&view=diff
==============================================================================
--- hive/trunk/metastore/src/gen/thrift/gen-py/hive_metastore/ttypes.py (original)
+++ hive/trunk/metastore/src/gen/thrift/gen-py/hive_metastore/ttypes.py Sat Jan 18 17:18:59 2014
@@ -3222,7 +3222,7 @@ class PartitionsByExprResult:
thrift_spec = (
None, # 0
- (1, TType.SET, 'partitions', (TType.STRUCT,(Partition, Partition.thrift_spec)), None, ), # 1
+ (1, TType.LIST, 'partitions', (TType.STRUCT,(Partition, Partition.thrift_spec)), None, ), # 1
(2, TType.BOOL, 'hasUnknownPartitions', None, None, ), # 2
)
@@ -3240,14 +3240,14 @@ class PartitionsByExprResult:
if ftype == TType.STOP:
break
if fid == 1:
- if ftype == TType.SET:
- self.partitions = set()
- (_etype230, _size227) = iprot.readSetBegin()
+ if ftype == TType.LIST:
+ self.partitions = []
+ (_etype230, _size227) = iprot.readListBegin()
for _i231 in xrange(_size227):
_elem232 = Partition()
_elem232.read(iprot)
- self.partitions.add(_elem232)
- iprot.readSetEnd()
+ self.partitions.append(_elem232)
+ iprot.readListEnd()
else:
iprot.skip(ftype)
elif fid == 2:
@@ -3266,11 +3266,11 @@ class PartitionsByExprResult:
return
oprot.writeStructBegin('PartitionsByExprResult')
if self.partitions is not None:
- oprot.writeFieldBegin('partitions', TType.SET, 1)
- oprot.writeSetBegin(TType.STRUCT, len(self.partitions))
+ oprot.writeFieldBegin('partitions', TType.LIST, 1)
+ oprot.writeListBegin(TType.STRUCT, len(self.partitions))
for iter233 in self.partitions:
iter233.write(oprot)
- oprot.writeSetEnd()
+ oprot.writeListEnd()
oprot.writeFieldEnd()
if self.hasUnknownPartitions is not None:
oprot.writeFieldBegin('hasUnknownPartitions', TType.BOOL, 2)
Modified: hive/trunk/metastore/src/gen/thrift/gen-rb/hive_metastore_types.rb
URL: http://svn.apache.org/viewvc/hive/trunk/metastore/src/gen/thrift/gen-rb/hive_metastore_types.rb?rev=1559367&r1=1559366&r2=1559367&view=diff
==============================================================================
--- hive/trunk/metastore/src/gen/thrift/gen-rb/hive_metastore_types.rb (original)
+++ hive/trunk/metastore/src/gen/thrift/gen-rb/hive_metastore_types.rb Sat Jan 18 17:18:59 2014
@@ -732,7 +732,7 @@ class PartitionsByExprResult
HASUNKNOWNPARTITIONS = 2
FIELDS = {
- PARTITIONS => {:type => ::Thrift::Types::SET, :name => 'partitions', :element => {:type => ::Thrift::Types::STRUCT, :class => ::Partition}},
+ PARTITIONS => {:type => ::Thrift::Types::LIST, :name => 'partitions', :element => {:type => ::Thrift::Types::STRUCT, :class => ::Partition}},
HASUNKNOWNPARTITIONS => {:type => ::Thrift::Types::BOOL, :name => 'hasUnknownPartitions'}
}
Modified: hive/trunk/metastore/src/java/org/apache/hadoop/hive/metastore/HiveMetaStore.java
URL: http://svn.apache.org/viewvc/hive/trunk/metastore/src/java/org/apache/hadoop/hive/metastore/HiveMetaStore.java?rev=1559367&r1=1559366&r2=1559367&view=diff
==============================================================================
--- hive/trunk/metastore/src/java/org/apache/hadoop/hive/metastore/HiveMetaStore.java (original)
+++ hive/trunk/metastore/src/java/org/apache/hadoop/hive/metastore/HiveMetaStore.java Sat Jan 18 17:18:59 2014
@@ -36,6 +36,7 @@ import java.util.HashSet;
import java.util.Iterator;
import java.util.LinkedHashMap;
import java.util.LinkedHashSet;
+import java.util.LinkedList;
import java.util.List;
import java.util.Map;
import java.util.Map.Entry;
@@ -3378,7 +3379,7 @@ public class HiveMetaStore extends Thrif
PartitionsByExprResult ret = null;
Exception ex = null;
try {
- Set<Partition> partitions = new LinkedHashSet<Partition>();
+ List<Partition> partitions = new LinkedList<Partition>();
boolean hasUnknownPartitions = getMS().getPartitionsByExpr(dbName, tblName,
req.getExpr(), req.getDefaultPartitionName(), req.getMaxParts(), partitions);
ret = new PartitionsByExprResult(partitions, hasUnknownPartitions);
Modified: hive/trunk/metastore/src/java/org/apache/hadoop/hive/metastore/ObjectStore.java
URL: http://svn.apache.org/viewvc/hive/trunk/metastore/src/java/org/apache/hadoop/hive/metastore/ObjectStore.java?rev=1559367&r1=1559366&r2=1559367&view=diff
==============================================================================
--- hive/trunk/metastore/src/java/org/apache/hadoop/hive/metastore/ObjectStore.java (original)
+++ hive/trunk/metastore/src/java/org/apache/hadoop/hive/metastore/ObjectStore.java Sat Jan 18 17:18:59 2014
@@ -1815,13 +1815,13 @@ public class ObjectStore implements RawS
@Override
public boolean getPartitionsByExpr(String dbName, String tblName, byte[] expr,
- String defaultPartitionName, short maxParts, Set<Partition> result) throws TException {
+ String defaultPartitionName, short maxParts, List<Partition> result) throws TException {
return getPartitionsByExprInternal(
dbName, tblName, expr, defaultPartitionName, maxParts, result, true, true);
}
protected boolean getPartitionsByExprInternal(String dbName, String tblName,
- byte[] expr, String defaultPartitionName, short maxParts, Set<Partition> result,
+ byte[] expr, String defaultPartitionName, short maxParts, List<Partition> result,
boolean allowSql, boolean allowJdo) throws TException {
assert result != null;
Modified: hive/trunk/metastore/src/java/org/apache/hadoop/hive/metastore/RawStore.java
URL: http://svn.apache.org/viewvc/hive/trunk/metastore/src/java/org/apache/hadoop/hive/metastore/RawStore.java?rev=1559367&r1=1559366&r2=1559367&view=diff
==============================================================================
--- hive/trunk/metastore/src/java/org/apache/hadoop/hive/metastore/RawStore.java (original)
+++ hive/trunk/metastore/src/java/org/apache/hadoop/hive/metastore/RawStore.java Sat Jan 18 17:18:59 2014
@@ -209,7 +209,7 @@ public interface RawStore extends Config
throws MetaException, NoSuchObjectException;
public abstract boolean getPartitionsByExpr(String dbName, String tblName,
- byte[] expr, String defaultPartitionName, short maxParts, Set<Partition> result)
+ byte[] expr, String defaultPartitionName, short maxParts, List<Partition> result)
throws TException;
public abstract List<Partition> getPartitionsByNames(
Modified: hive/trunk/metastore/src/test/org/apache/hadoop/hive/metastore/DummyRawStoreControlledCommit.java
URL: http://svn.apache.org/viewvc/hive/trunk/metastore/src/test/org/apache/hadoop/hive/metastore/DummyRawStoreControlledCommit.java?rev=1559367&r1=1559366&r2=1559367&view=diff
==============================================================================
--- hive/trunk/metastore/src/test/org/apache/hadoop/hive/metastore/DummyRawStoreControlledCommit.java (original)
+++ hive/trunk/metastore/src/test/org/apache/hadoop/hive/metastore/DummyRawStoreControlledCommit.java Sat Jan 18 17:18:59 2014
@@ -306,7 +306,7 @@ public class DummyRawStoreControlledComm
@Override
public boolean getPartitionsByExpr(String dbName, String tblName, byte[] expr,
- String defaultPartitionName, short maxParts, Set<Partition> result) throws TException {
+ String defaultPartitionName, short maxParts, List<Partition> result) throws TException {
return objectStore.getPartitionsByExpr(
dbName, tblName, expr, defaultPartitionName, maxParts, result);
}
Modified: hive/trunk/metastore/src/test/org/apache/hadoop/hive/metastore/DummyRawStoreForJdoConnection.java
URL: http://svn.apache.org/viewvc/hive/trunk/metastore/src/test/org/apache/hadoop/hive/metastore/DummyRawStoreForJdoConnection.java?rev=1559367&r1=1559366&r2=1559367&view=diff
==============================================================================
--- hive/trunk/metastore/src/test/org/apache/hadoop/hive/metastore/DummyRawStoreForJdoConnection.java (original)
+++ hive/trunk/metastore/src/test/org/apache/hadoop/hive/metastore/DummyRawStoreForJdoConnection.java Sat Jan 18 17:18:59 2014
@@ -325,7 +325,7 @@ public class DummyRawStoreForJdoConnecti
@Override
public boolean getPartitionsByExpr(String dbName, String tblName, byte[] expr,
- String defaultPartitionName, short maxParts, Set<Partition> result) throws TException {
+ String defaultPartitionName, short maxParts, List<Partition> result) throws TException {
return false;
}
Modified: hive/trunk/metastore/src/test/org/apache/hadoop/hive/metastore/VerifyingObjectStore.java
URL: http://svn.apache.org/viewvc/hive/trunk/metastore/src/test/org/apache/hadoop/hive/metastore/VerifyingObjectStore.java?rev=1559367&r1=1559366&r2=1559367&view=diff
==============================================================================
--- hive/trunk/metastore/src/test/org/apache/hadoop/hive/metastore/VerifyingObjectStore.java (original)
+++ hive/trunk/metastore/src/test/org/apache/hadoop/hive/metastore/VerifyingObjectStore.java Sat Jan 18 17:18:59 2014
@@ -26,7 +26,7 @@ import java.lang.reflect.Field;
import java.lang.reflect.Modifier;
import java.util.Collection;
import java.util.Iterator;
-import java.util.LinkedHashSet;
+import java.util.LinkedList;
import java.util.List;
import java.util.Map;
import java.util.Set;
@@ -72,8 +72,8 @@ class VerifyingObjectStore extends Objec
@Override
public boolean getPartitionsByExpr(String dbName, String tblName, byte[] expr,
- String defaultPartitionName, short maxParts, Set<Partition> result) throws TException {
- Set<Partition> ormParts = new LinkedHashSet<Partition>();
+ String defaultPartitionName, short maxParts, List<Partition> result) throws TException {
+ List<Partition> ormParts = new LinkedList<Partition>();
boolean sqlResult = getPartitionsByExprInternal(
dbName, tblName, expr, defaultPartitionName, maxParts, result, true, false);
boolean ormResult = getPartitionsByExprInternal(
Modified: hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/exec/DDLTask.java
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/exec/DDLTask.java?rev=1559367&r1=1559366&r2=1559367&view=diff
==============================================================================
--- hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/exec/DDLTask.java (original)
+++ hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/exec/DDLTask.java Sat Jan 18 17:18:59 2014
@@ -307,7 +307,7 @@ public class DDLTask extends Task<DDLWor
AddPartitionDesc addPartitionDesc = work.getAddPartitionDesc();
if (addPartitionDesc != null) {
- return addPartitions(db, addPartitionDesc); // TODO#: here
+ return addPartitions(db, addPartitionDesc);
}
RenamePartitionDesc renamePartitionDesc = work.getRenamePartitionDesc();
@@ -1103,7 +1103,7 @@ public class DDLTask extends Task<DDLWor
* @throws HiveException
*/
private int addPartitions(Hive db, AddPartitionDesc addPartitionDesc) throws HiveException {
- List<Partition> parts = db.createPartitions(addPartitionDesc); // TODO#: here
+ List<Partition> parts = db.createPartitions(addPartitionDesc);
for (Partition part : parts) {
work.getOutputs().add(new WriteEntity(part));
}