hive-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sp...@apache.org
Subject svn commit: r1671887 - in /hive/trunk/metastore/src/java/org/apache/hadoop/hive/metastore: MetaStoreDirectSql.java ObjectStore.java
Date Tue, 07 Apr 2015 17:13:07 GMT
Author: spena
Date: Tue Apr  7 17:13:07 2015
New Revision: 1671887

URL: http://svn.apache.org/r1671887
Log:
HIVE-9819: Add timeout check inside the HMS server (Dong Chen via Sergio Pena)

Modified:
    hive/trunk/metastore/src/java/org/apache/hadoop/hive/metastore/MetaStoreDirectSql.java
    hive/trunk/metastore/src/java/org/apache/hadoop/hive/metastore/ObjectStore.java

Modified: hive/trunk/metastore/src/java/org/apache/hadoop/hive/metastore/MetaStoreDirectSql.java
URL: http://svn.apache.org/viewvc/hive/trunk/metastore/src/java/org/apache/hadoop/hive/metastore/MetaStoreDirectSql.java?rev=1671887&r1=1671886&r2=1671887&view=diff
==============================================================================
--- hive/trunk/metastore/src/java/org/apache/hadoop/hive/metastore/MetaStoreDirectSql.java
(original)
+++ hive/trunk/metastore/src/java/org/apache/hadoop/hive/metastore/MetaStoreDirectSql.java
Tue Apr  7 17:13:07 2015
@@ -852,6 +852,7 @@ class MetaStoreDirectSql {
         func.apply(entry.getValue(), fields);
         fields = null;
       }
+      Deadline.checkTimeout();
     }
     int rv = list.size();
     query.closeAll();
@@ -1152,6 +1153,7 @@ class MetaStoreDirectSql {
           list.size());
       for (Object[] row : list) {
         colStats.add(prepareCSObj(row, 0));
+        Deadline.checkTimeout();
       }
       query.closeAll();
       return colStats;
@@ -1193,6 +1195,7 @@ class MetaStoreDirectSql {
         } else {
           extraColumnNameTypeParts.put(colName, new String[] { colType, String.valueOf(count)
});
         }
+        Deadline.checkTimeout();
       }
       query.closeAll();
       // Extrapolation is not needed for columns noExtraColumnNames
@@ -1212,6 +1215,7 @@ class MetaStoreDirectSql {
         list = ensureList(qResult);
         for (Object[] row : list) {
           colStats.add(prepareCSObj(row, 0));
+          Deadline.checkTimeout();
         }
         end = doTrace ? System.nanoTime() : 0;
         timingTrace(doTrace, queryText, start, end);
@@ -1251,6 +1255,7 @@ class MetaStoreDirectSql {
             indexToObject.put(sumIndex[ind - 1], row[ind]);
           }
           sumMap.put((String) row[0], indexToObject);
+          Deadline.checkTimeout();
         }
         end = doTrace ? System.nanoTime() : 0;
         timingTrace(doTrace, queryText, start, end);
@@ -1318,6 +1323,7 @@ class MetaStoreDirectSql {
             }
           }
           colStats.add(prepareCSObj(row, 0));
+          Deadline.checkTimeout();
         }
       }
       return colStats;
@@ -1389,6 +1395,7 @@ class MetaStoreDirectSql {
       }
       lastPartName = partName;
       from = i;
+      Deadline.checkTimeout();
     }
 
     timingTrace(doTrace, queryText, start, queryTime);
@@ -1416,6 +1423,7 @@ class MetaStoreDirectSql {
         csd.setLastAnalyzed(extractSqlLong(laObj));
       }
       csos.add(prepareCSObj(row, offset));
+      Deadline.checkTimeout();
     }
     result.setStatsObj(csos);
     return result;

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=1671887&r1=1671886&r2=1671887&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 Tue Apr
 7 17:13:07 2015
@@ -1817,6 +1817,7 @@ public class ObjectStore implements RawS
     }
     for (MPartition mp : src) {
       dest.add(convertToPart(mp));
+      Deadline.checkTimeout();
     }
     return dest;
   }
@@ -1826,6 +1827,7 @@ public class ObjectStore implements RawS
     List<Partition> parts = new ArrayList<Partition>(mparts.size());
     for (MPartition mp : mparts) {
       parts.add(convertToPart(dbName, tblName, mp));
+      Deadline.checkTimeout();
     }
     return parts;
   }
@@ -6049,6 +6051,7 @@ public class ObjectStore implements RawS
             desc.setLastAnalyzed(mStat.getLastAnalyzed());
           }
           statObjs.add(StatObjectConverter.getTableColumnStatisticsObj(mStat));
+          Deadline.checkTimeout();
         }
         return new ColumnStatistics(desc, statObjs);
       }
@@ -6097,6 +6100,7 @@ public class ObjectStore implements RawS
           }
           curList.add(StatObjectConverter.getPartitionColumnStatisticsObj(mStatsObj));
           lastPartName = partName;
+          Deadline.checkTimeout();
         }
         return result;
       }



Mime
View raw message