trafodion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dbirds...@apache.org
Subject [1/4] incubator-trafodion git commit: Implement TRAFODION-1420 Use ClientSmallScanner for small scans to improve perdormance Hbase implements an optimization for small scan (defined as scanning less than a data block ie 64Kb) resulting in 3X performance
Date Thu, 28 Jan 2016 00:17:48 GMT
Repository: incubator-trafodion
Updated Branches:
  refs/heads/master adb821b5d -> 125ae499f


http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/49a06f8b/core/sql/regress/seabase/EXPECTED011
----------------------------------------------------------------------
diff --git a/core/sql/regress/seabase/EXPECTED011 b/core/sql/regress/seabase/EXPECTED011
index 27de89a..012f55f 100644
--- a/core/sql/regress/seabase/EXPECTED011
+++ b/core/sql/regress/seabase/EXPECTED011
@@ -7,7 +7,7 @@
 >>invoke T011T1;
 
 -- Definition of Trafodion table TRAFODION.SCH.T011T1
--- Definition current  Wed Jan  6 23:31:01 2016
+-- Definition current  Sat Jan 23 04:06:15 2016
 
   (
     A                                INT NO DEFAULT NOT NULL NOT DROPPABLE
@@ -142,7 +142,7 @@ A            B
 ------------------------------------------------------------------ PLAN SUMMARY
 MODULE_NAME .............. DYNAMICALLY COMPILED
 STATEMENT_NAME ........... NOT NAMED
-PLAN_ID .................. 212318883062781505
+PLAN_ID .................. 212320281977039065
 ROWS_OUT ................. 7
 EST_TOTAL_COST ........... 0.01
 STATEMENT ................ select * from t011t1 where a >= 3 and a < 5;
@@ -174,13 +174,14 @@ DESCRIPTION
   SEABASE_VOLATILE_TABLES  ON
   HBASE_ASYNC_DROP_TABLE   OFF
   HBASE_SERIALIZATION .... ON
+  HBASE_SMALL_SCANNER .... SYSTEM
   HBASE_FILTER_PREDS ..... 2
   TRAF_ALIGNED_ROW_FORMAT  OFF
   TRAF_INDEX_CREATE_OPT    ON
   SCHEMA ................. TRAFODION.SCH
   QUERY_CACHE ............ 0
   GENERATE_EXPLAIN ....... ON
-  ObjectUIDs ............. 5568224739891142318
+  ObjectUIDs ............. 3130652840489752733
   select_list ............ TRAFODION.SCH.T011T1.A, TRAFODION.SCH.T011T1.B
 
 
@@ -201,6 +202,7 @@ DESCRIPTION
   begin_keys(incl) ....... 3
   end_keys(excl) ......... 5
   cache_size ........... 100
+  small_scanner .......... ON
   probes ................. 1
   rows_accessed ......... 11
   column_retrieved ....... #1:1,#1:2
@@ -1266,7 +1268,7 @@ METRIC_TEXT_TABLE
 >>invoke trafodion."_REPOS_".metric_query_table;
 
 -- Definition of Trafodion table TRAFODION."_REPOS_".METRIC_QUERY_TABLE
--- Definition current  Wed Jan  6 23:33:14 2016
+-- Definition current  Sat Jan 23 04:08:38 2016
 
   (
     INSTANCE_ID                      INT UNSIGNED NO DEFAULT NOT NULL NOT
@@ -1448,7 +1450,7 @@ METRIC_TEXT_TABLE
 >>-- get qid for the prepared stmt
 >>get qid for statement explstmt;
 
-MXID11000009891212318883040903421000000000206U3333300_1923_EXPLSTMT
+MXID11000005561212320281953925061000000000206U3333300_1924_EXPLSTMT
 
 --- SQL operation complete.
 >>
@@ -1500,7 +1502,7 @@ SEQ_NUM      OPERATOR
 --- SQL command prepared.
 >>get qid for statement explstmt2;
 
-MXID11000009891212318883040903421000000000206U3333300_1934_EXPLSTMT2
+MXID11000005561212320281953925061000000000206U3333300_1935_EXPLSTMT2
 
 --- SQL operation complete.
 >>set qid MXID123456 for explstmt2;
@@ -2073,7 +2075,7 @@ LC   RC   OP   OPERATOR              OPT       DESCRIPTION         
 CARD
 >>invoke t011t7;
 
 -- Definition of Trafodion table TRAFODION.SCH.T011T7
--- Definition current  Wed Jan  6 23:34:21 2016
+-- Definition current  Sat Jan 23 04:09:41 2016
 
   (
     A                                INT NO DEFAULT NOT NULL NOT DROPPABLE
@@ -2090,7 +2092,7 @@ LC   RC   OP   OPERATOR              OPT       DESCRIPTION         
 CARD
 >>invoke t011t7;
 
 -- Definition of Trafodion table TRAFODION.SCH.T011T7
--- Definition current  Wed Jan  6 23:34:25 2016
+-- Definition current  Sat Jan 23 04:09:45 2016
 
   (
     A                                INT NO DEFAULT NOT NULL NOT DROPPABLE
@@ -2107,7 +2109,7 @@ LC   RC   OP   OPERATOR              OPT       DESCRIPTION         
 CARD
 >>invoke t011t7;
 
 -- Definition of Trafodion table TRAFODION.SCH.T011T7
--- Definition current  Wed Jan  6 23:34:28 2016
+-- Definition current  Sat Jan 23 04:09:49 2016
 
   (
     A                                INT NO DEFAULT NOT NULL NOT DROPPABLE

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/49a06f8b/core/sql/regress/seabase/EXPECTED016
----------------------------------------------------------------------
diff --git a/core/sql/regress/seabase/EXPECTED016 b/core/sql/regress/seabase/EXPECTED016
index 8547cff..6d631b8 100644
--- a/core/sql/regress/seabase/EXPECTED016
+++ b/core/sql/regress/seabase/EXPECTED016
@@ -179,7 +179,7 @@ LC   RC   OP   OPERATOR              OPT       DESCRIPTION           CARD
 ------------------------------------------------------------------ PLAN SUMMARY
 MODULE_NAME .............. DYNAMICALLY COMPILED
 STATEMENT_NAME ........... ST1
-PLAN_ID .................. 212318883773450737
+PLAN_ID .................. 212320282637448134
 ROWS_OUT ................. 1
 EST_TOTAL_COST ......... 553.48
 STATEMENT ................ select f,count(f)
@@ -214,6 +214,7 @@ DESCRIPTION
   SEABASE_VOLATILE_TABLES  ON
   HBASE_ASYNC_DROP_TABLE   OFF
   HBASE_SERIALIZATION .... ON
+  HBASE_SMALL_SCANNER .... SYSTEM
   HBASE_FILTER_PREDS ..... 2
   TRAF_ALIGNED_ROW_FORMAT  OFF
   TRAF_INDEX_CREATE_OPT    ON
@@ -223,7 +224,7 @@ DESCRIPTION
   HBASE_MIN_BYTES_PER_ESP  1
   USTAT_COLLECT_MC_SKEW_V  ON
   PARALLEL_NUM_ESPS ...... 4
-  ObjectUIDs ............. 1492467077764906944
+  ObjectUIDs ............. 953725371151598413
   select_list ............ TRAFODION.HBASE.MCSTATPART7.F,
                              cast(sum(count_nonull(TRAFODION.HBASE.MCSTATPART7.
                              F)))
@@ -326,7 +327,7 @@ LC   RC   OP   OPERATOR              OPT       DESCRIPTION           CARD
 ------------------------------------------------------------------ PLAN SUMMARY
 MODULE_NAME .............. DYNAMICALLY COMPILED
 STATEMENT_NAME ........... ST1
-PLAN_ID .................. 212318883773834175
+PLAN_ID .................. 212320282637741686
 ROWS_OUT ................. 1
 EST_TOTAL_COST ......... 568.59
 STATEMENT ................ select f,count(f)
@@ -361,6 +362,7 @@ DESCRIPTION
   SEABASE_VOLATILE_TABLES  ON
   HBASE_ASYNC_DROP_TABLE   OFF
   HBASE_SERIALIZATION .... ON
+  HBASE_SMALL_SCANNER .... SYSTEM
   HBASE_FILTER_PREDS ..... 2
   TRAF_ALIGNED_ROW_FORMAT  OFF
   TRAF_INDEX_CREATE_OPT    ON
@@ -370,7 +372,7 @@ DESCRIPTION
   HBASE_MIN_BYTES_PER_ESP  1
   USTAT_COLLECT_MC_SKEW_V  ON
   PARALLEL_NUM_ESPS ...... 4
-  ObjectUIDs ............. 1492467077764909533
+  ObjectUIDs ............. 953725371151600526
   select_list ............ TRAFODION.HBASE.MCSTATPART5.F,
                              cast(sum(count_nonull(TRAFODION.HBASE.MCSTATPART5.
                              F)))
@@ -473,7 +475,7 @@ LC   RC   OP   OPERATOR              OPT       DESCRIPTION           CARD
 ------------------------------------------------------------------ PLAN SUMMARY
 MODULE_NAME .............. DYNAMICALLY COMPILED
 STATEMENT_NAME ........... ST1
-PLAN_ID .................. 212318883774174434
+PLAN_ID .................. 212320282638023675
 ROWS_OUT ................. 1
 EST_TOTAL_COST ......... 553.48
 STATEMENT ................ select f,count(f)
@@ -508,6 +510,7 @@ DESCRIPTION
   SEABASE_VOLATILE_TABLES  ON
   HBASE_ASYNC_DROP_TABLE   OFF
   HBASE_SERIALIZATION .... ON
+  HBASE_SMALL_SCANNER .... SYSTEM
   HBASE_FILTER_PREDS ..... 2
   TRAF_ALIGNED_ROW_FORMAT  OFF
   TRAF_INDEX_CREATE_OPT    ON
@@ -517,7 +520,7 @@ DESCRIPTION
   HBASE_MIN_BYTES_PER_ESP  1
   USTAT_COLLECT_MC_SKEW_V  ON
   PARALLEL_NUM_ESPS ...... 4
-  ObjectUIDs ............. 1492467077764910468
+  ObjectUIDs ............. 953725371151601389
   select_list ............ TRAFODION.HBASE.MCSTATPART3.F,
                              cast(sum(count_nonull(TRAFODION.HBASE.MCSTATPART3.
                              F)))
@@ -620,7 +623,7 @@ LC   RC   OP   OPERATOR              OPT       DESCRIPTION           CARD
 ------------------------------------------------------------------ PLAN SUMMARY
 MODULE_NAME .............. DYNAMICALLY COMPILED
 STATEMENT_NAME ........... ST1
-PLAN_ID .................. 212318883774449563
+PLAN_ID .................. 212320282638276314
 ROWS_OUT ................. 1
 EST_TOTAL_COST ......... 523.92
 STATEMENT ................ select f,count(f)
@@ -655,6 +658,7 @@ DESCRIPTION
   SEABASE_VOLATILE_TABLES  ON
   HBASE_ASYNC_DROP_TABLE   OFF
   HBASE_SERIALIZATION .... ON
+  HBASE_SMALL_SCANNER .... SYSTEM
   HBASE_FILTER_PREDS ..... 2
   TRAF_ALIGNED_ROW_FORMAT  OFF
   TRAF_INDEX_CREATE_OPT    ON
@@ -664,7 +668,7 @@ DESCRIPTION
   HBASE_MIN_BYTES_PER_ESP  1
   USTAT_COLLECT_MC_SKEW_V  ON
   PARALLEL_NUM_ESPS ...... 4
-  ObjectUIDs ............. 1492467077764911379
+  ObjectUIDs ............. 953725371151602308
   select_list ............ TRAFODION.HBASE.MCSTATPART6.F,
                              cast(sum(count_nonull(TRAFODION.HBASE.MCSTATPART6.
                              F)))
@@ -767,7 +771,7 @@ LC   RC   OP   OPERATOR              OPT       DESCRIPTION           CARD
 ------------------------------------------------------------------ PLAN SUMMARY
 MODULE_NAME .............. DYNAMICALLY COMPILED
 STATEMENT_NAME ........... ST1
-PLAN_ID .................. 212318883774716355
+PLAN_ID .................. 212320282638589572
 ROWS_OUT ................. 1
 EST_TOTAL_COST ......... 523.92
 STATEMENT ................ select f,count(f)
@@ -802,6 +806,7 @@ DESCRIPTION
   SEABASE_VOLATILE_TABLES  ON
   HBASE_ASYNC_DROP_TABLE   OFF
   HBASE_SERIALIZATION .... ON
+  HBASE_SMALL_SCANNER .... SYSTEM
   HBASE_FILTER_PREDS ..... 2
   TRAF_ALIGNED_ROW_FORMAT  OFF
   TRAF_INDEX_CREATE_OPT    ON
@@ -811,7 +816,7 @@ DESCRIPTION
   HBASE_MIN_BYTES_PER_ESP  1
   USTAT_COLLECT_MC_SKEW_V  ON
   PARALLEL_NUM_ESPS ...... 4
-  ObjectUIDs ............. 1492467077764912234
+  ObjectUIDs ............. 953725371151603186
   select_list ............ TRAFODION.HBASE.MCSTATPART2.F,
                              cast(sum(count_nonull(TRAFODION.HBASE.MCSTATPART2.
                              F)))
@@ -914,7 +919,7 @@ LC   RC   OP   OPERATOR              OPT       DESCRIPTION           CARD
 ------------------------------------------------------------------ PLAN SUMMARY
 MODULE_NAME .............. DYNAMICALLY COMPILED
 STATEMENT_NAME ........... ST1
-PLAN_ID .................. 212318883775019433
+PLAN_ID .................. 212320282638883341
 ROWS_OUT ................. 1
 EST_TOTAL_COST ......... 538.3
 STATEMENT ................ select f,count(f)
@@ -949,6 +954,7 @@ DESCRIPTION
   SEABASE_VOLATILE_TABLES  ON
   HBASE_ASYNC_DROP_TABLE   OFF
   HBASE_SERIALIZATION .... ON
+  HBASE_SMALL_SCANNER .... SYSTEM
   HBASE_FILTER_PREDS ..... 2
   TRAF_ALIGNED_ROW_FORMAT  OFF
   TRAF_INDEX_CREATE_OPT    ON
@@ -958,7 +964,7 @@ DESCRIPTION
   HBASE_MIN_BYTES_PER_ESP  1
   USTAT_COLLECT_MC_SKEW_V  ON
   PARALLEL_NUM_ESPS ...... 4
-  ObjectUIDs ............. 1492467077764913063
+  ObjectUIDs ............. 953725371151604056
   select_list ............ TRAFODION.HBASE.MCSTATPART1.F,
                              cast(sum(count_nonull(TRAFODION.HBASE.MCSTATPART1.
                              F)))
@@ -1061,7 +1067,7 @@ LC   RC   OP   OPERATOR              OPT       DESCRIPTION         
 CARD
 ------------------------------------------------------------------ PLAN SUMMARY
 MODULE_NAME .............. DYNAMICALLY COMPILED
 STATEMENT_NAME ........... ST1
-PLAN_ID .................. 212318883775293423
+PLAN_ID .................. 212320282639174313
 ROWS_OUT ................. 1
 EST_TOTAL_COST ......... 553.48
 STATEMENT ................ select f,count(f)
@@ -1096,6 +1102,7 @@ DESCRIPTION
   SEABASE_VOLATILE_TABLES  ON
   HBASE_ASYNC_DROP_TABLE   OFF
   HBASE_SERIALIZATION .... ON
+  HBASE_SMALL_SCANNER .... SYSTEM
   HBASE_FILTER_PREDS ..... 2
   TRAF_ALIGNED_ROW_FORMAT  OFF
   TRAF_INDEX_CREATE_OPT    ON
@@ -1105,7 +1112,7 @@ DESCRIPTION
   HBASE_MIN_BYTES_PER_ESP  1
   USTAT_COLLECT_MC_SKEW_V  ON
   PARALLEL_NUM_ESPS ...... 4
-  ObjectUIDs ............. 1492467077764913972
+  ObjectUIDs ............. 953725371151604853
   select_list ............ TRAFODION.HBASE.MCSTATPART8.F,
                              cast(sum(count_nonull(TRAFODION.HBASE.MCSTATPART8.
                              F)))

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/49a06f8b/core/sql/regress/tools/runregr_executor.ksh
----------------------------------------------------------------------
diff --git a/core/sql/regress/tools/runregr_executor.ksh b/core/sql/regress/tools/runregr_executor.ksh
index 5b77e35..d603674 100755
--- a/core/sql/regress/tools/runregr_executor.ksh
+++ b/core/sql/regress/tools/runregr_executor.ksh
@@ -237,7 +237,7 @@ skippedfiles=
 
 # sbtestfiles contains the list of tests to be run in seabase mode
 if [ "$seabase" -ne 0 ]; then
-  sbtestfiles="TEST001 TEST002 TEST012 TEST013 TEST014 TEST015 TEST016 TEST020 TEST022 TEST025
TEST050 TEST063 TEST088 TEST101 TEST106 TEST107 TEST122 TEST130 TEST140"
+  sbtestfiles="TEST001 TEST002 TEST012 TEST013 TEST014 TEST015 TEST016 TEST020 TEST022 TEST025
TEST050 TEST063 TEST088 TEST101 TEST106 TEST107 TEST122 TEST130 TEST131 TEST140"
   sbprettyfiles=
   for i in $prettyfiles; do
     for j in $sbtestfiles; do

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/49a06f8b/core/sql/regress/tools/sbdefs
----------------------------------------------------------------------
diff --git a/core/sql/regress/tools/sbdefs b/core/sql/regress/tools/sbdefs
index 7fc062d..08088a2 100644
--- a/core/sql/regress/tools/sbdefs
+++ b/core/sql/regress/tools/sbdefs
@@ -27,6 +27,7 @@ cqd seabase_volatile_tables 'ON';
 cqd hbase_async_drop_table 'OFF';
 cqd hbase_serialization 'ON';
 --cqd hbase_coprocessors 'OFF';
+cqd hbase_small_scanner 'SYSTEM';
 cqd hbase_filter_preds '2';
 cqd traf_aligned_row_format 'OFF';
 --cqd traf_default_col_charset 'UTF8';

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/49a06f8b/core/sql/sqlcomp/DefaultConstants.h
----------------------------------------------------------------------
diff --git a/core/sql/sqlcomp/DefaultConstants.h b/core/sql/sqlcomp/DefaultConstants.h
index de747b9..a653397 100644
--- a/core/sql/sqlcomp/DefaultConstants.h
+++ b/core/sql/sqlcomp/DefaultConstants.h
@@ -3753,6 +3753,8 @@ enum DefaultConstants
 
   UDR_JVM_DEBUG_PORT,
   UDR_JVM_DEBUG_TIMEOUT,
+  //enable HBASE Small Scanner, optimizing scans of size below HFile block size
+  HBASE_SMALL_SCANNER,
 
   TRAF_LOAD_ALLOW_RISKY_INDEX_MAINTENANCE,
   HBASE_RANGE_PARTITIONING_PARTIAL_COLS,

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/49a06f8b/core/sql/sqlcomp/nadefaults.cpp
----------------------------------------------------------------------
diff --git a/core/sql/sqlcomp/nadefaults.cpp b/core/sql/sqlcomp/nadefaults.cpp
index fc6e0a0..e63928d 100644
--- a/core/sql/sqlcomp/nadefaults.cpp
+++ b/core/sql/sqlcomp/nadefaults.cpp
@@ -1785,6 +1785,7 @@ SDDkwd__(EXE_DIAGNOSTIC_EVENTS,		"OFF"),
  DDkwd__(HBASE_SERIALIZATION,		"ON"),
  
   DD_____(HBASE_SERVER,                         ""), 
+  DDkwd__(HBASE_SMALL_SCANNER,      "OFF"),
   DDkwd__(HBASE_SQL_IUD_SEMANTICS,		"ON"),
   DDkwd__(HBASE_STATS_PARTITIONING,           	"ON"),
   DDkwd__(HBASE_TRANSFORM_UPDATE_TO_DELETE_INSERT,		"OFF"),
@@ -4046,6 +4047,7 @@ NADefaults::NADefaults(NAMemory * h)
   setFlagOn(ZIG_ZAG_TREES, DEFAULT_ALLOWS_SEPARATE_SYSTEM);
   setFlagOn(COMPRESSED_INTERNAL_FORMAT, DEFAULT_ALLOWS_SEPARATE_SYSTEM);
   setFlagOn(COMPRESSED_INTERNAL_FORMAT_BMO, DEFAULT_ALLOWS_SEPARATE_SYSTEM);
+  setFlagOn(HBASE_SMALL_SCANNER, DEFAULT_ALLOWS_SEPARATE_SYSTEM);
 }
 
 NADefaults::~NADefaults()

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/49a06f8b/core/sql/src/main/java/org/trafodion/sql/HTableClient.java
----------------------------------------------------------------------
diff --git a/core/sql/src/main/java/org/trafodion/sql/HTableClient.java b/core/sql/src/main/java/org/trafodion/sql/HTableClient.java
index ba29f99..0b10b08 100644
--- a/core/sql/src/main/java/org/trafodion/sql/HTableClient.java
+++ b/core/sql/src/main/java/org/trafodion/sql/HTableClient.java
@@ -778,7 +778,7 @@ public class HTableClient {
     
 	public boolean startScan(long transID, byte[] startRow, byte[] stopRow,
                                  Object[]  columns, long timestamp,
-                                 boolean cacheBlocks, int numCacheRows,
+                                 boolean cacheBlocks, boolean smallScanner, int numCacheRows,
                                  Object[] colNamesToFilter, 
                                  Object[] compareOpList, 
                                  Object[] colValuesToCompare,
@@ -827,6 +827,7 @@ public class HTableClient {
 	  else
               scan.setCacheBlocks(false);
           
+      scan.setSmall(smallScanner);
 	  scan.setCaching(numCacheRows);
 	  numRowsCached = numCacheRows;
 	  if (columns != null) {


Mime
View raw message