You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafodion.apache.org by se...@apache.org on 2016/10/27 02:30:55 UTC

[1/9] incubator-trafodion git commit: [TRAFODION-2306] Trafodion customization using its own configuration file

Repository: incubator-trafodion
Updated Branches:
  refs/heads/master aae2c0982 -> bbcfca5ad


[TRAFODION-2306] Trafodion customization using its own configuration file

See JIRA for details


Project: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/commit/0a05c03c
Tree: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/tree/0a05c03c
Diff: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/diff/0a05c03c

Branch: refs/heads/master
Commit: 0a05c03c85537f1d54ac34dbc47a8decc273e828
Parents: e0f18ae
Author: selvaganesang <se...@esgyn.com>
Authored: Sun Oct 23 01:42:27 2016 +0000
Committer: selvaganesang <se...@esgyn.com>
Committed: Sun Oct 23 01:42:27 2016 +0000

----------------------------------------------------------------------
 core/sqf/sql/scripts/install_local_hadoop       |  12 ---
 core/sqf/sql/scripts/sqgen                      |  15 ++-
 core/sqf/sql/scripts/traf-site.xml              |  23 ++++
 .../sqf/sql/scripts/traf_coprocessor.properties |  26 -----
 .../java/org/trafodion/dtm/HBaseTxClient.java   |   6 +-
 .../main/java/org/trafodion/dtm/TrafInfo.java   |   4 +-
 .../org/trafodion/sql/CoprocessorUtils.java     | 104 -------------------
 .../java/org/trafodion/sql/HBaseClient.java     |  27 ++---
 .../java/org/trafodion/sql/TrafRegionStats.java |   4 +-
 9 files changed, 55 insertions(+), 166 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/0a05c03c/core/sqf/sql/scripts/install_local_hadoop
----------------------------------------------------------------------
diff --git a/core/sqf/sql/scripts/install_local_hadoop b/core/sqf/sql/scripts/install_local_hadoop
index 153c97e..a759289 100755
--- a/core/sqf/sql/scripts/install_local_hadoop
+++ b/core/sqf/sql/scripts/install_local_hadoop
@@ -1625,19 +1625,7 @@ echo "$MY_LOCAL_SW_DIST/${HBASE_TAR}"
     <name>hbase.master.distributed.log.splitting</name>
     <value>false</value>
    </property>
-   <property>
-     <name>hbase.hregion.impl</name>
-     <value>org.apache.hadoop.hbase.regionserver.transactional.TransactionalRegion</value>
-   </property>
    ${MASTER_VISBILITY_COPROC}
-   <property>
-    <name>hbase.coprocessor.region.classes</name>
-      <value>
-           org.apache.hadoop.hbase.coprocessor.transactional.TrxRegionObserver,
-           org.apache.hadoop.hbase.coprocessor.transactional.TrxRegionEndpoint,
-           org.apache.hadoop.hbase.coprocessor.AggregateImplementation
-      </value>
-   </property>
 </configuration>
 EOF
 

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/0a05c03c/core/sqf/sql/scripts/sqgen
----------------------------------------------------------------------
diff --git a/core/sqf/sql/scripts/sqgen b/core/sqf/sql/scripts/sqgen
index 68c3c03..52d0c01 100755
--- a/core/sqf/sql/scripts/sqgen
+++ b/core/sqf/sql/scripts/sqgen
@@ -187,7 +187,20 @@ fi
 
 ./gensqstatem2lenv > $SQETC_DIR/sqstatem2l.env
 
-cp ./traf_coprocessor.properties $SQETC_DIR/
+if [ -f $SQETC_DIR/traf-site.xml ]; then
+    echo "Trafodion customization file $SQETC_DIR/traf-site.xml exists."
+    echo "The file will not be copied."
+    echo
+else
+    echo "Copying Trafodion customization file: $SQETC_DIR/traf-site.xml"
+    echo
+    cp ./traf-site.xml $SQETC_DIR
+    lv_retcode=$?
+    if [[ $lv_retcode != 0 ]]; then 
+	echo "Error $lv_retcode while copying Exiting..."
+	exit $lv_retcode
+    fi
+fi
 
 # Create configuration database tables
 rm -f sqconfig.db

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/0a05c03c/core/sqf/sql/scripts/traf-site.xml
----------------------------------------------------------------------
diff --git a/core/sqf/sql/scripts/traf-site.xml b/core/sqf/sql/scripts/traf-site.xml
new file mode 100644
index 0000000..9411a44
--- /dev/null
+++ b/core/sqf/sql/scripts/traf-site.xml
@@ -0,0 +1,23 @@
+<?xml version="1.0"?>
+<?xml-stylesheet type="text/xsl" href="configuration.xsl"?>
+
+<!-- Put Trafodion site-specific property overrides in this file. -->
+
+<configuration>
+   <property>
+     <name>hbase.hregion.impl</name>
+     <value>org.apache.hadoop.hbase.regionserver.transactional.TransactionalRegion</value>
+   </property>
+   <property>
+    <name>hbase.coprocessor.region.classes</name>
+      <value>
+           org.apache.hadoop.hbase.coprocessor.transactional.TrxRegionObserver,
+           org.apache.hadoop.hbase.coprocessor.transactional.TrxRegionEndpoint,
+           org.apache.hadoop.hbase.coprocessor.AggregateImplementation
+      </value>
+   </property>
+   <property>
+    <name>hbase.client.scanner.timeout.period</name>
+    <value>3600000</value>
+   </property>
+</configuration>

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/0a05c03c/core/sqf/sql/scripts/traf_coprocessor.properties
----------------------------------------------------------------------
diff --git a/core/sqf/sql/scripts/traf_coprocessor.properties b/core/sqf/sql/scripts/traf_coprocessor.properties
deleted file mode 100644
index d69e2f2..0000000
--- a/core/sqf/sql/scripts/traf_coprocessor.properties
+++ /dev/null
@@ -1,26 +0,0 @@
-#
-# @@@ START COPYRIGHT @@@
-#
-# 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.
-#
-# @@@ END COPYRIGHT @@@
-#
-
-coprocessors=org.apache.hadoop.hbase.coprocessor.transactional.TrxRegionObserver,org.apache.hadoop.hbase.coprocessor.AggregateImplementation
-MVCC=org.apache.hadoop.hbase.coprocessor.transactional.TrxRegionEndpoint
-SSCC=org.apache.hadoop.hbase.coprocessor.transactional.SsccRegionEndpoint

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/0a05c03c/core/sqf/src/seatrans/tm/hbasetmlib2/src/main/java/org/trafodion/dtm/HBaseTxClient.java
----------------------------------------------------------------------
diff --git a/core/sqf/src/seatrans/tm/hbasetmlib2/src/main/java/org/trafodion/dtm/HBaseTxClient.java b/core/sqf/src/seatrans/tm/hbasetmlib2/src/main/java/org/trafodion/dtm/HBaseTxClient.java
index 1cf3025..77c4808 100644
--- a/core/sqf/src/seatrans/tm/hbasetmlib2/src/main/java/org/trafodion/dtm/HBaseTxClient.java
+++ b/core/sqf/src/seatrans/tm/hbasetmlib2/src/main/java/org/trafodion/dtm/HBaseTxClient.java
@@ -57,7 +57,6 @@ import org.apache.hadoop.hbase.client.transactional.TransactionMap;
 import org.apache.hadoop.hbase.client.transactional.TransactionalReturn;
 import org.apache.hadoop.hbase.client.transactional.TmDDL;
 import org.apache.hadoop.hbase.exceptions.DeserializationException;
-import org.apache.hadoop.hbase.HBaseConfiguration;
 import org.apache.hadoop.hbase.HColumnDescriptor;
 import org.apache.hadoop.hbase.HRegionInfo;
 import org.apache.hadoop.hbase.HRegionLocation;
@@ -74,6 +73,7 @@ import org.apache.hadoop.hbase.regionserver.transactional.IdTmException;
 import org.apache.hadoop.hbase.regionserver.transactional.IdTmId;
 
 import org.apache.zookeeper.KeeperException;
+import org.trafodion.sql.TrafConfiguration;
 
 import java.util.Map;
 import java.util.HashMap;
@@ -124,7 +124,7 @@ public class HBaseTxClient {
       if (LOG.isDebugEnabled()) LOG.debug("Enter init, hBasePath:" + hBasePath);
       if (LOG.isTraceEnabled()) LOG.trace("mapTransactionStates " + mapTransactionStates + " entries " + mapTransactionStates.size());
       if (config == null) {
-         config = HBaseConfiguration.create();
+         config = TrafConfiguration.create();
          connection = ConnectionFactory.createConnection(config);
       }
       config.set("hbase.zookeeper.quorum", zkServers);
@@ -203,7 +203,7 @@ public class HBaseTxClient {
       setupLog4j();
       if (LOG.isDebugEnabled()) LOG.debug("Enter init(" + dtmid + ")");
       if (config == null) {
-         config = HBaseConfiguration.create();
+         config = TrafConfiguration.create();
          connection = ConnectionFactory.createConnection(config);
       }
       config.set("hbase.hregion.impl", "org.apache.hadoop.hbase.regionserver.transactional.TransactionalRegion");

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/0a05c03c/core/sqf/src/seatrans/tm/hbasetmlib2/src/main/java/org/trafodion/dtm/TrafInfo.java
----------------------------------------------------------------------
diff --git a/core/sqf/src/seatrans/tm/hbasetmlib2/src/main/java/org/trafodion/dtm/TrafInfo.java b/core/sqf/src/seatrans/tm/hbasetmlib2/src/main/java/org/trafodion/dtm/TrafInfo.java
index 777eaea..495ad46 100644
--- a/core/sqf/src/seatrans/tm/hbasetmlib2/src/main/java/org/trafodion/dtm/TrafInfo.java
+++ b/core/sqf/src/seatrans/tm/hbasetmlib2/src/main/java/org/trafodion/dtm/TrafInfo.java
@@ -30,7 +30,6 @@ import java.util.Map;
 
 import org.apache.hadoop.conf.Configuration;
 import org.apache.hadoop.hbase.HRegionInfo;
-import org.apache.hadoop.hbase.HBaseConfiguration;
 import org.apache.hadoop.hbase.ServerName;
 import org.apache.hadoop.hbase.client.Connection;
 import org.apache.hadoop.hbase.client.ConnectionFactory;
@@ -38,6 +37,7 @@ import org.apache.hadoop.hbase.client.ConnectionFactory;
 //H98import org.apache.hadoop.hbase.ipc.TransactionalRegionInterface;
 //H98import org.apache.hadoop.hbase.ipc.HRegionInterface;
 
+import org.trafodion.sql.TrafConfiguration;
 
 public class TrafInfo {
 
@@ -50,7 +50,7 @@ public class TrafInfo {
     }
 
     public void init() throws IOException {
-        this.config = HBaseConfiguration.create();
+        this.config = TrafConfiguration.create();
         this.connection = ConnectionFactory.createConnection(config);
     }
 

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/0a05c03c/core/sql/src/main/java/org/trafodion/sql/CoprocessorUtils.java
----------------------------------------------------------------------
diff --git a/core/sql/src/main/java/org/trafodion/sql/CoprocessorUtils.java b/core/sql/src/main/java/org/trafodion/sql/CoprocessorUtils.java
deleted file mode 100644
index 9a3d75c..0000000
--- a/core/sql/src/main/java/org/trafodion/sql/CoprocessorUtils.java
+++ /dev/null
@@ -1,104 +0,0 @@
-// @@@ START COPYRIGHT @@@
-// //
-// // 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.
-// //
-// // @@@ END COPYRIGHT @@@
-
-package org.trafodion.sql;
-
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.List;
-
-import org.apache.commons.configuration.Configuration;
-import org.apache.commons.configuration.ConfigurationException;
-import org.apache.commons.configuration.PropertiesConfiguration;
-import org.apache.hadoop.hbase.HTableDescriptor;
-import org.apache.log4j.Logger;
-
-public class CoprocessorUtils {
-    private static Logger logger = Logger.getLogger(CoprocessorUtils.class.getName());
-    private static List<String> coprocessors = new ArrayList<String>();
-    private static String MVCC = null;
-    private static String SSCC = null;
-
-    static {
-        init();
-    }
-
-    private static void init() {
-        Configuration config = null;
-        try {
-            String path = System.getenv("MY_SQROOT") + "/etc/traf_coprocessor.properties";
-            config = new PropertiesConfiguration(path);
-        } catch (ConfigurationException e) {
-            logger.error("error when finding trafcoprocess.properties");
-            e.printStackTrace();
-        }
-
-        if (config != null) {
-            for (String coprocessor : config.getStringArray("coprocessors")) {
-                coprocessors.add(coprocessor);
-            }
-            MVCC = config.getString("MVCC");
-            SSCC = config.getString("SSCC");
-        }
-    }
-
-    //boolean as return ,to make sure whether changes take place in HTableDescriptor
-    public static boolean addCoprocessor(String currentAllClassName, HTableDescriptor desc, boolean isMVCC) throws IOException {
-        boolean retVal = false; 
-        if (coprocessors == null) {
-            return retVal;
-        }
-        for (String coprocess : coprocessors) {
-            if ((currentAllClassName == null || !currentAllClassName.contains(coprocess)) && !desc.hasCoprocessor(coprocess)) {
-                desc.addCoprocessor(coprocess);
-                retVal = true;
-            }
-        }
-        
-        if (isMVCC && (currentAllClassName == null || !currentAllClassName.contains(MVCC)) && !desc.hasCoprocessor(MVCC)) {
-            desc.addCoprocessor(MVCC);
-            retVal = true;
-        } else if (!isMVCC && (currentAllClassName == null || !currentAllClassName.contains(SSCC)) && !desc.hasCoprocessor(SSCC)) {
-            desc.addCoprocessor(SSCC);
-            retVal = true;
-        }
-
-        return retVal;
-    }
-
-    public static boolean addCoprocessor(String currentAllClassName, HTableDescriptor desc) throws IOException {
-        return addCoprocessor(currentAllClassName, desc, true);
-    }
-    public static void main(String[] args) throws IOException {
-        System.out.println("================CoprocessorUtils.main======================");
-        String currentAllClassName = "";
-        HTableDescriptor desc = new HTableDescriptor();
-        boolean isMVCC = true;
-        addCoprocessor(currentAllClassName, desc, isMVCC);
-
-        List<String> list = desc.getCoprocessors();
-
-        for (String string : list) {
-            System.out.println(string);
-        }
-        System.out.println("================CoprocessorUtils.main======================");
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/0a05c03c/core/sql/src/main/java/org/trafodion/sql/HBaseClient.java
----------------------------------------------------------------------
diff --git a/core/sql/src/main/java/org/trafodion/sql/HBaseClient.java b/core/sql/src/main/java/org/trafodion/sql/HBaseClient.java
index 5ab258c..47fc716 100644
--- a/core/sql/src/main/java/org/trafodion/sql/HBaseClient.java
+++ b/core/sql/src/main/java/org/trafodion/sql/HBaseClient.java
@@ -37,7 +37,6 @@ import java.net.URISyntaxException;
 import org.apache.log4j.PropertyConfigurator;
 import org.apache.log4j.Logger;
 import org.apache.hadoop.fs.FileSystem;
-import org.apache.hadoop.hbase.HBaseConfiguration;
 import org.apache.hadoop.hbase.client.ConnectionFactory;
 import org.apache.hadoop.hbase.client.Connection;
 import org.apache.hadoop.hbase.client.Admin;
@@ -73,6 +72,7 @@ import org.apache.hadoop.hbase.regionserver.BloomType;
 import org.apache.hadoop.hbase.regionserver.KeyPrefixRegionSplitPolicy;
 import org.apache.hadoop.hbase.client.Durability;
 import org.trafodion.sql.HTableClient;
+import org.trafodion.sql.TrafConfiguration;
 import org.apache.hadoop.hbase.ServerLoad;
 import org.apache.hadoop.hbase.RegionLoad;
 import org.apache.hadoop.hbase.client.HTable;
@@ -101,7 +101,7 @@ import com.google.protobuf.ServiceException;
 public class HBaseClient {
 
     static Logger logger = Logger.getLogger(HBaseClient.class.getName());
-    private static Configuration config = HBaseConfiguration.create();
+    private static Configuration config = null;
     private RMInterface table = null;
 
     // variables used for getRegionStats() and getClusterStats()
@@ -155,21 +155,11 @@ public class HBaseClient {
     		confFile = System.getenv("MY_SQROOT") + "/conf/log4j.hdfs.config";
     	}
     	PropertyConfigurator.configure(confFile);
+        config = TrafConfiguration.create();
     }
 
     
     static public Connection getConnection() throws IOException {
-        // On some distributions, the hbase.client.scanner.timeout.period setting is
-        // too small, resulting in annoying SocketTimeoutExceptions during operations
-        // such as UPDATE STATISTICS on very large tables. On CDH 5.4.5 in particular
-        // we have seen this. Unfortunately Cloudera Manager does not allow us to 
-        // change this setting, and setting it manually in hbase-site.xml doesn't work
-        // because a later Cloudera Manager deploy would just overwrite it. So, we
-        // programmatically check the setting here and insure it is at least 1 hour.
-        long configuredTimeout = config.getLong("hbase.client.scanner.timeout.period",0);
-        if (configuredTimeout < 3600000 /* 1 hour */)
-          config.setLong("hbase.client.scanner.timeout.period",3600000);    
- 
         if (connection == null) 
               connection = ConnectionFactory.createConnection(config);
         return connection;
@@ -185,13 +175,18 @@ public class HBaseClient {
         table = new RMInterface(connection);
         return true;
     }
+
+    private void addCoprocessor(HTableDescriptor desc) {
+        String coprocessorClasses = config.get("hbase.coprocessor.region.classes");
+        if (coprocessorClasses != null)
+           desc.addCoprocessor(coprocessorClasses);
+    }
  
     public boolean create(String tblName, Object[]  colFamNameList,
                           boolean isMVCC) 
         throws IOException, MasterNotRunningException {
             if (logger.isDebugEnabled()) logger.debug("HBaseClient.create(" + tblName + ") called, and MVCC is " + isMVCC + ".");
-            HTableDescriptor desc = new HTableDescriptor(tblName);
-            CoprocessorUtils.addCoprocessor(config.get("hbase.coprocessor.region.classes"), desc, isMVCC);
+            addCoprocessor(desc);
             for (int i = 0; i < colFamNameList.length ; i++) {
 		String  colFam = (String)colFamNameList[i];
                 HColumnDescriptor colDesc = new HColumnDescriptor(colFam);
@@ -442,7 +437,7 @@ public class HBaseClient {
             if (logger.isDebugEnabled()) logger.debug("HBaseClient.createk(" + tblName + ") called.");
             String trueStr = "TRUE";
             HTableDescriptor desc = new HTableDescriptor(tblName);
-            CoprocessorUtils.addCoprocessor(config.get("hbase.coprocessor.region.classes"), desc, isMVCC);
+            addCoprocessor(desc);
             int defaultVersionsValue = 0;
             if (isMVCC)
                 defaultVersionsValue = DtmConst.MVCC_MAX_VERSION;

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/0a05c03c/core/sql/src/main/java/org/trafodion/sql/TrafRegionStats.java
----------------------------------------------------------------------
diff --git a/core/sql/src/main/java/org/trafodion/sql/TrafRegionStats.java b/core/sql/src/main/java/org/trafodion/sql/TrafRegionStats.java
index 89fa90f..42a9fba 100644
--- a/core/sql/src/main/java/org/trafodion/sql/TrafRegionStats.java
+++ b/core/sql/src/main/java/org/trafodion/sql/TrafRegionStats.java
@@ -24,7 +24,6 @@ package org.trafodion.sql;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 import org.apache.hadoop.conf.Configuration;
-import org.apache.hadoop.hbase.HBaseConfiguration;
 import org.apache.hadoop.hbase.ClusterStatus;
 import org.apache.hadoop.hbase.HRegionInfo;
 import org.apache.hadoop.hbase.RegionLoad;
@@ -33,6 +32,7 @@ import org.apache.hadoop.hbase.ServerName;
 import org.apache.hadoop.hbase.client.Admin;
 import org.apache.hadoop.hbase.client.HTable;
 import org.apache.hadoop.hbase.client.HBaseAdmin;
+import org.trafodion.sql.TrafConfiguration;
 
 import java.io.IOException;
 import java.util.Arrays;
@@ -158,7 +158,7 @@ public class TrafRegionStats {
 
 
     public TrafRegionStats () throws IOException {
-        Configuration config = HBaseConfiguration.create();
+        Configuration config = TrafConfiguration.create();
 
         hbAdmin = new HBaseAdmin(config);
     }


[3/9] incubator-trafodion git commit: [TRAFODION-2306] Trafodion customization using its own configuration

Posted by se...@apache.org.
[TRAFODION-2306] Trafodion customization using its own configuration


Project: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/commit/5569b681
Tree: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/tree/5569b681
Diff: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/diff/5569b681

Branch: refs/heads/master
Commit: 5569b681228bf80b90a95bc5094098e186e99268
Parents: 5106c8c
Author: selvaganesang <se...@esgyn.com>
Authored: Mon Oct 24 01:41:07 2016 +0000
Committer: selvaganesang <se...@esgyn.com>
Committed: Mon Oct 24 01:41:07 2016 +0000

----------------------------------------------------------------------
 core/sql/src/main/java/org/trafodion/sql/HBaseClient.java   | 3 ++-
 .../src/main/java/org/trafodion/sql/TrafConfiguration.java  | 9 +++++----
 2 files changed, 7 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/5569b681/core/sql/src/main/java/org/trafodion/sql/HBaseClient.java
----------------------------------------------------------------------
diff --git a/core/sql/src/main/java/org/trafodion/sql/HBaseClient.java b/core/sql/src/main/java/org/trafodion/sql/HBaseClient.java
index 47fc716..84122a4 100644
--- a/core/sql/src/main/java/org/trafodion/sql/HBaseClient.java
+++ b/core/sql/src/main/java/org/trafodion/sql/HBaseClient.java
@@ -176,7 +176,7 @@ public class HBaseClient {
         return true;
     }
 
-    private void addCoprocessor(HTableDescriptor desc) {
+    private void addCoprocessor(HTableDescriptor desc) throws IOException {
         String coprocessorClasses = config.get("hbase.coprocessor.region.classes");
         if (coprocessorClasses != null)
            desc.addCoprocessor(coprocessorClasses);
@@ -186,6 +186,7 @@ public class HBaseClient {
                           boolean isMVCC) 
         throws IOException, MasterNotRunningException {
             if (logger.isDebugEnabled()) logger.debug("HBaseClient.create(" + tblName + ") called, and MVCC is " + isMVCC + ".");
+            HTableDescriptor desc = new HTableDescriptor(tblName);
             addCoprocessor(desc);
             for (int i = 0; i < colFamNameList.length ; i++) {
 		String  colFam = (String)colFamNameList[i];

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/5569b681/core/sql/src/main/java/org/trafodion/sql/TrafConfiguration.java
----------------------------------------------------------------------
diff --git a/core/sql/src/main/java/org/trafodion/sql/TrafConfiguration.java b/core/sql/src/main/java/org/trafodion/sql/TrafConfiguration.java
index b71333c..4f3e842 100644
--- a/core/sql/src/main/java/org/trafodion/sql/TrafConfiguration.java
+++ b/core/sql/src/main/java/org/trafodion/sql/TrafConfiguration.java
@@ -20,6 +20,8 @@ package org.trafodion.sql;
 import org.apache.log4j.Logger;
 import org.apache.hadoop.conf.Configuration;
 import org.apache.hadoop.hbase.HBaseConfiguration;
+import org.apache.hadoop.fs.Path;
+
 
 /**
  * Adds Trafodion configuration files to a Configuration
@@ -29,10 +31,9 @@ public class TrafConfiguration extends HBaseConfiguration {
   static Logger logger = Logger.getLogger(TrafConfiguration.class.getName());
 
   public static Configuration addTrafResources(Configuration conf) {
-    logger.trace("Calling TrafConfiguration.addTrafResources");
-    String trafSiteXml = System.getenv("MY_SQROOT") + "/etc/traf-site.xml";
-    conf.addResource(trafSiteXml);
-
+    String trafSiteXml = new String(System.getenv("MY_SQROOT") + "/etc/traf-site.xml");
+    Path fileRes = new Path(trafSiteXml);
+    conf.addResource(fileRes);
     return conf;
   }
 


[9/9] incubator-trafodion git commit: Merge [TRAFODION-2306] PR 788 rafodion customization using its own configuration file

Posted by se...@apache.org.
Merge [TRAFODION-2306] PR 788 rafodion customization using its own configuration file


Project: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/commit/bbcfca5a
Tree: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/tree/bbcfca5a
Diff: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/diff/bbcfca5a

Branch: refs/heads/master
Commit: bbcfca5ad4b66e99e1da68f03be4234112d90dd2
Parents: aae2c09 356e6c4
Author: selvaganesang <se...@apache.org>
Authored: Thu Oct 27 02:28:50 2016 +0000
Committer: selvaganesang <se...@apache.org>
Committed: Thu Oct 27 02:28:50 2016 +0000

----------------------------------------------------------------------
 core/sqf/sql/scripts/install_local_hadoop | 4 ++++
 1 file changed, 4 insertions(+)
----------------------------------------------------------------------



[6/9] incubator-trafodion git commit: [TRAFODION-2306] Trafodion customization using its own configuration file

Posted by se...@apache.org.
[TRAFODION-2306] Trafodion customization using its own configuration file


Project: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/commit/78a5f20a
Tree: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/tree/78a5f20a
Diff: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/diff/78a5f20a

Branch: refs/heads/master
Commit: 78a5f20a15aed2702bf1df3f94e6d25fb718de37
Parents: 33a2acf
Author: selvaganesang <se...@esgyn.com>
Authored: Tue Oct 25 01:06:50 2016 +0000
Committer: selvaganesang <se...@esgyn.com>
Committed: Tue Oct 25 01:06:50 2016 +0000

----------------------------------------------------------------------
 core/sqf/sql/scripts/sqgen                      |  8 ++---
 core/sqf/sql/scripts/traf-site.xml              | 38 --------------------
 core/sqf/sql/scripts/trafodion-site.xml         | 38 ++++++++++++++++++++
 .../java/org/trafodion/sql/HBaseClient.java     |  8 ++---
 .../org/trafodion/sql/TrafConfiguration.java    | 19 +++++++---
 5 files changed, 61 insertions(+), 50 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/78a5f20a/core/sqf/sql/scripts/sqgen
----------------------------------------------------------------------
diff --git a/core/sqf/sql/scripts/sqgen b/core/sqf/sql/scripts/sqgen
index 52d0c01..a761f08 100755
--- a/core/sqf/sql/scripts/sqgen
+++ b/core/sqf/sql/scripts/sqgen
@@ -187,14 +187,14 @@ fi
 
 ./gensqstatem2lenv > $SQETC_DIR/sqstatem2l.env
 
-if [ -f $SQETC_DIR/traf-site.xml ]; then
-    echo "Trafodion customization file $SQETC_DIR/traf-site.xml exists."
+if [ -f $SQETC_DIR/trafodion-site.xml ]; then
+    echo "Trafodion customization file $SQETC_DIR/trafodion-site.xml exists."
     echo "The file will not be copied."
     echo
 else
-    echo "Copying Trafodion customization file: $SQETC_DIR/traf-site.xml"
+    echo "Copying Trafodion customization file: $SQETC_DIR/trafodion-site.xml"
     echo
-    cp ./traf-site.xml $SQETC_DIR
+    cp ./trafodion-site.xml $SQETC_DIR
     lv_retcode=$?
     if [[ $lv_retcode != 0 ]]; then 
 	echo "Error $lv_retcode while copying Exiting..."

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/78a5f20a/core/sqf/sql/scripts/traf-site.xml
----------------------------------------------------------------------
diff --git a/core/sqf/sql/scripts/traf-site.xml b/core/sqf/sql/scripts/traf-site.xml
deleted file mode 100644
index fc04716..0000000
--- a/core/sqf/sql/scripts/traf-site.xml
+++ /dev/null
@@ -1,38 +0,0 @@
-<?xml version="1.0"?>
-<?xml-stylesheet type="text/xsl" href="configuration.xsl"?>
- <!--
-/**
- * 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.
- */
--->
-
-<!-- Put Trafodion site-specific property overrides in this file. -->
-
-<configuration>
-   <property>
-    <name>hbase.coprocessor.region.classes</name>
-      <value>
-           org.apache.hadoop.hbase.coprocessor.transactional.TrxRegionObserver,
-           org.apache.hadoop.hbase.coprocessor.transactional.TrxRegionEndpoint,
-           org.apache.hadoop.hbase.coprocessor.AggregateImplementation
-      </value>
-   </property>
-   <property>
-    <name>hbase.client.scanner.timeout.period</name>
-    <value>3600000</value>
-   </property>
-</configuration>

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/78a5f20a/core/sqf/sql/scripts/trafodion-site.xml
----------------------------------------------------------------------
diff --git a/core/sqf/sql/scripts/trafodion-site.xml b/core/sqf/sql/scripts/trafodion-site.xml
new file mode 100644
index 0000000..fc04716
--- /dev/null
+++ b/core/sqf/sql/scripts/trafodion-site.xml
@@ -0,0 +1,38 @@
+<?xml version="1.0"?>
+<?xml-stylesheet type="text/xsl" href="configuration.xsl"?>
+ <!--
+/**
+ * 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.
+ */
+-->
+
+<!-- Put Trafodion site-specific property overrides in this file. -->
+
+<configuration>
+   <property>
+    <name>hbase.coprocessor.region.classes</name>
+      <value>
+           org.apache.hadoop.hbase.coprocessor.transactional.TrxRegionObserver,
+           org.apache.hadoop.hbase.coprocessor.transactional.TrxRegionEndpoint,
+           org.apache.hadoop.hbase.coprocessor.AggregateImplementation
+      </value>
+   </property>
+   <property>
+    <name>hbase.client.scanner.timeout.period</name>
+    <value>3600000</value>
+   </property>
+</configuration>

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/78a5f20a/core/sql/src/main/java/org/trafodion/sql/HBaseClient.java
----------------------------------------------------------------------
diff --git a/core/sql/src/main/java/org/trafodion/sql/HBaseClient.java b/core/sql/src/main/java/org/trafodion/sql/HBaseClient.java
index 4d34c8c..c007f74 100644
--- a/core/sql/src/main/java/org/trafodion/sql/HBaseClient.java
+++ b/core/sql/src/main/java/org/trafodion/sql/HBaseClient.java
@@ -177,11 +177,11 @@ public class HBaseClient {
     }
 
     private void addCoprocessor(HTableDescriptor desc) throws IOException {
-        String coprocessorClasses = config.get("hbase.coprocessor.region.classes");
-        if (coprocessorClasses != null) {
-           String[] coprocessors = coprocessorClasses.split(",");
-           for (int i = 0; i < coprocessors.length ; i++)
+        String[] coprocessors = config.getStrings("hbase.coprocessor.region.classes");
+        if (coprocessors != null) {
+           for (int i = 0; i < coprocessors.length ; i++) {
                desc.addCoprocessor(coprocessors[i].trim());
+           }
         }
     }
  

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/78a5f20a/core/sql/src/main/java/org/trafodion/sql/TrafConfiguration.java
----------------------------------------------------------------------
diff --git a/core/sql/src/main/java/org/trafodion/sql/TrafConfiguration.java b/core/sql/src/main/java/org/trafodion/sql/TrafConfiguration.java
index 4f3e842..0d7e44a 100644
--- a/core/sql/src/main/java/org/trafodion/sql/TrafConfiguration.java
+++ b/core/sql/src/main/java/org/trafodion/sql/TrafConfiguration.java
@@ -21,7 +21,8 @@ import org.apache.log4j.Logger;
 import org.apache.hadoop.conf.Configuration;
 import org.apache.hadoop.hbase.HBaseConfiguration;
 import org.apache.hadoop.fs.Path;
-
+import java.util.Iterator;
+import java.util.Map;
 
 /**
  * Adds Trafodion configuration files to a Configuration
@@ -31,9 +32,19 @@ public class TrafConfiguration extends HBaseConfiguration {
   static Logger logger = Logger.getLogger(TrafConfiguration.class.getName());
 
   public static Configuration addTrafResources(Configuration conf) {
-    String trafSiteXml = new String(System.getenv("MY_SQROOT") + "/etc/traf-site.xml");
+    Configuration lv_conf = new Configuration();
+    String trafSiteXml = new String(System.getenv("MY_SQROOT") + "/etc/trafodion-site.xml");
     Path fileRes = new Path(trafSiteXml);
-    conf.addResource(fileRes);
+    lv_conf.addResource(fileRes);
+    Iterator<Map.Entry<String,String>> iter = lv_conf.iterator();
+    String key;
+    while (iter.hasNext()) {
+       Map.Entry<String,String> entry = iter.next();
+       key = entry.getKey();
+       if (key.startsWith("trafodion."))
+          key = key.substring(10); // 10 - length of trafodion.
+       conf.set(key, entry.getValue());
+    }
     return conf;
   }
 
@@ -48,7 +59,7 @@ public class TrafConfiguration extends HBaseConfiguration {
 
   /**
    * @param that Configuration to clone.
-   * @return a Configuration created with the traf-site.xml files plus
+   * @return a Configuration created with the trafodion-site.xml files plus
    * the given configuration.
    */
   public static Configuration create(final Configuration that) {


[5/9] incubator-trafodion git commit: [TRAFODION-2306] Trafodion customization using its own configuration file

Posted by se...@apache.org.
[TRAFODION-2306] Trafodion customization using its own configuration file


Project: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/commit/33a2acf5
Tree: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/tree/33a2acf5
Diff: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/diff/33a2acf5

Branch: refs/heads/master
Commit: 33a2acf569a38f20334fb794a7b7b66697bace66
Parents: 0a95638
Author: selvaganesang <se...@esgyn.com>
Authored: Mon Oct 24 18:39:01 2016 +0000
Committer: selvaganesang <se...@esgyn.com>
Committed: Mon Oct 24 18:39:01 2016 +0000

----------------------------------------------------------------------
 core/sqf/sql/scripts/traf-site.xml | 19 +++++++++++++++++++
 1 file changed, 19 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/33a2acf5/core/sqf/sql/scripts/traf-site.xml
----------------------------------------------------------------------
diff --git a/core/sqf/sql/scripts/traf-site.xml b/core/sqf/sql/scripts/traf-site.xml
index 6fe9f12..fc04716 100644
--- a/core/sqf/sql/scripts/traf-site.xml
+++ b/core/sqf/sql/scripts/traf-site.xml
@@ -1,5 +1,24 @@
 <?xml version="1.0"?>
 <?xml-stylesheet type="text/xsl" href="configuration.xsl"?>
+ <!--
+/**
+ * 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.
+ */
+-->
 
 <!-- Put Trafodion site-specific property overrides in this file. -->
 


[4/9] incubator-trafodion git commit: [TRAFODION-2306] Trafodion customization using its own configuration

Posted by se...@apache.org.
[TRAFODION-2306] Trafodion customization using its own configuration


Project: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/commit/0a95638d
Tree: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/tree/0a95638d
Diff: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/diff/0a95638d

Branch: refs/heads/master
Commit: 0a95638de5b99ffccb6e0be8854335071b4f62c2
Parents: 5569b68
Author: selvaganesang <se...@esgyn.com>
Authored: Mon Oct 24 14:46:46 2016 +0000
Committer: selvaganesang <se...@esgyn.com>
Committed: Mon Oct 24 14:46:46 2016 +0000

----------------------------------------------------------------------
 core/sqf/sql/scripts/install_local_hadoop                     | 4 ++++
 core/sqf/sql/scripts/traf-site.xml                            | 4 ----
 .../src/main/java/org/trafodion/sql/TrafConfiguration.java    | 1 +
 core/sql/src/main/java/org/trafodion/sql/HBaseClient.java     | 7 +++++--
 4 files changed, 10 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/0a95638d/core/sqf/sql/scripts/install_local_hadoop
----------------------------------------------------------------------
diff --git a/core/sqf/sql/scripts/install_local_hadoop b/core/sqf/sql/scripts/install_local_hadoop
index a759289..e387fd2 100755
--- a/core/sqf/sql/scripts/install_local_hadoop
+++ b/core/sqf/sql/scripts/install_local_hadoop
@@ -1625,6 +1625,10 @@ echo "$MY_LOCAL_SW_DIST/${HBASE_TAR}"
     <name>hbase.master.distributed.log.splitting</name>
     <value>false</value>
    </property>
+   <property>
+     <name>hbase.hregion.impl</name>
+     <value>org.apache.hadoop.hbase.regionserver.transactional.TransactionalRegion</value>
+   </property>
    ${MASTER_VISBILITY_COPROC}
 </configuration>
 EOF

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/0a95638d/core/sqf/sql/scripts/traf-site.xml
----------------------------------------------------------------------
diff --git a/core/sqf/sql/scripts/traf-site.xml b/core/sqf/sql/scripts/traf-site.xml
index 9411a44..6fe9f12 100644
--- a/core/sqf/sql/scripts/traf-site.xml
+++ b/core/sqf/sql/scripts/traf-site.xml
@@ -5,10 +5,6 @@
 
 <configuration>
    <property>
-     <name>hbase.hregion.impl</name>
-     <value>org.apache.hadoop.hbase.regionserver.transactional.TransactionalRegion</value>
-   </property>
-   <property>
     <name>hbase.coprocessor.region.classes</name>
       <value>
            org.apache.hadoop.hbase.coprocessor.transactional.TrxRegionObserver,

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/0a95638d/core/sqf/src/seatrans/tm/hbasetmlib2/src/main/java/org/trafodion/sql/TrafConfiguration.java
----------------------------------------------------------------------
diff --git a/core/sqf/src/seatrans/tm/hbasetmlib2/src/main/java/org/trafodion/sql/TrafConfiguration.java b/core/sqf/src/seatrans/tm/hbasetmlib2/src/main/java/org/trafodion/sql/TrafConfiguration.java
new file mode 120000
index 0000000..811c58c
--- /dev/null
+++ b/core/sqf/src/seatrans/tm/hbasetmlib2/src/main/java/org/trafodion/sql/TrafConfiguration.java
@@ -0,0 +1 @@
+../../../../../../../../../../../sql/src/main/java/org/trafodion/sql/TrafConfiguration.java
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/0a95638d/core/sql/src/main/java/org/trafodion/sql/HBaseClient.java
----------------------------------------------------------------------
diff --git a/core/sql/src/main/java/org/trafodion/sql/HBaseClient.java b/core/sql/src/main/java/org/trafodion/sql/HBaseClient.java
index 84122a4..4d34c8c 100644
--- a/core/sql/src/main/java/org/trafodion/sql/HBaseClient.java
+++ b/core/sql/src/main/java/org/trafodion/sql/HBaseClient.java
@@ -178,8 +178,11 @@ public class HBaseClient {
 
     private void addCoprocessor(HTableDescriptor desc) throws IOException {
         String coprocessorClasses = config.get("hbase.coprocessor.region.classes");
-        if (coprocessorClasses != null)
-           desc.addCoprocessor(coprocessorClasses);
+        if (coprocessorClasses != null) {
+           String[] coprocessors = coprocessorClasses.split(",");
+           for (int i = 0; i < coprocessors.length ; i++)
+               desc.addCoprocessor(coprocessors[i].trim());
+        }
     }
  
     public boolean create(String tblName, Object[]  colFamNameList,


[2/9] incubator-trafodion git commit: [TRAFODION-2306] Trafodion customization using its own configuration

Posted by se...@apache.org.
[TRAFODION-2306] Trafodion customization using its own configuration

Added file TrafConfiguration.java that was missed out in the last commit


Project: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/commit/5106c8c0
Tree: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/tree/5106c8c0
Diff: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/diff/5106c8c0

Branch: refs/heads/master
Commit: 5106c8c0d0ef9fe6e7da60ed0ae4012b39411610
Parents: 0a05c03
Author: selvaganesang <se...@esgyn.com>
Authored: Sun Oct 23 01:49:51 2016 +0000
Committer: selvaganesang <se...@esgyn.com>
Committed: Sun Oct 23 01:49:51 2016 +0000

----------------------------------------------------------------------
 .../org/trafodion/sql/TrafConfiguration.java    | 58 ++++++++++++++++++++
 1 file changed, 58 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/5106c8c0/core/sql/src/main/java/org/trafodion/sql/TrafConfiguration.java
----------------------------------------------------------------------
diff --git a/core/sql/src/main/java/org/trafodion/sql/TrafConfiguration.java b/core/sql/src/main/java/org/trafodion/sql/TrafConfiguration.java
new file mode 100644
index 0000000..b71333c
--- /dev/null
+++ b/core/sql/src/main/java/org/trafodion/sql/TrafConfiguration.java
@@ -0,0 +1,58 @@
+/**
+ * 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.trafodion.sql;
+
+import org.apache.log4j.Logger;
+import org.apache.hadoop.conf.Configuration;
+import org.apache.hadoop.hbase.HBaseConfiguration;
+
+/**
+ * Adds Trafodion configuration files to a Configuration
+ */
+public class TrafConfiguration extends HBaseConfiguration {
+
+  static Logger logger = Logger.getLogger(TrafConfiguration.class.getName());
+
+  public static Configuration addTrafResources(Configuration conf) {
+    logger.trace("Calling TrafConfiguration.addTrafResources");
+    String trafSiteXml = System.getenv("MY_SQROOT") + "/etc/traf-site.xml";
+    conf.addResource(trafSiteXml);
+
+    return conf;
+  }
+
+  /**
+   * Creates a Configuration with Trafodion resources
+   * @return a Configuration with Trafodion and HBase resources
+   */
+  public static Configuration create() {
+    Configuration conf = HBaseConfiguration.create();
+    return addTrafResources(conf);
+  }
+
+  /**
+   * @param that Configuration to clone.
+   * @return a Configuration created with the traf-site.xml files plus
+   * the given configuration.
+   */
+  public static Configuration create(final Configuration that) {
+    Configuration conf = create();
+    merge(conf, that);
+    return conf;
+  }
+}


[8/9] incubator-trafodion git commit: [TRAFODION-2306] Trafodion customization using its own configuration file

Posted by se...@apache.org.
[TRAFODION-2306] Trafodion customization using its own configuration file

Missed out this change as part of merge of PR #777


Project: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/commit/356e6c41
Tree: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/tree/356e6c41
Diff: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/diff/356e6c41

Branch: refs/heads/master
Commit: 356e6c41e9a3b006a3f8d9e8d58d183017360f04
Parents: e112e95
Author: selvaganesang <se...@esgyn.com>
Authored: Wed Oct 26 20:58:31 2016 +0000
Committer: selvaganesang <se...@esgyn.com>
Committed: Wed Oct 26 20:58:31 2016 +0000

----------------------------------------------------------------------
 core/sqf/sql/scripts/install_local_hadoop | 4 ++++
 1 file changed, 4 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/356e6c41/core/sqf/sql/scripts/install_local_hadoop
----------------------------------------------------------------------
diff --git a/core/sqf/sql/scripts/install_local_hadoop b/core/sqf/sql/scripts/install_local_hadoop
index 39b0ba2..67083bd 100755
--- a/core/sqf/sql/scripts/install_local_hadoop
+++ b/core/sqf/sql/scripts/install_local_hadoop
@@ -1632,6 +1632,10 @@ echo "$MY_LOCAL_SW_DIST/${HBASE_TAR}"
     <name>hbase.master.distributed.log.splitting</name>
     <value>false</value>
    </property>
+   <property>
+     <name>hbase.hregion.impl</name>
+     <value>org.apache.hadoop.hbase.regionserver.transactional.TransactionalRegion</value>
+   </property>
    ${HREGION_IMPL}
    ${MASTER_VISBILITY_COPROC}
 </configuration>


[7/9] incubator-trafodion git commit: Merge branch 'master' of github.com:apache/incubator-trafodion into traf_properties

Posted by se...@apache.org.
Merge branch 'master' of github.com:apache/incubator-trafodion into traf_properties


Project: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/commit/e112e95d
Tree: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/tree/e112e95d
Diff: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/diff/e112e95d

Branch: refs/heads/master
Commit: e112e95ddd7476ac8959b8ec8ba99c00c3ea6a13
Parents: 78a5f20 fe07eda
Author: selvaganesang <se...@esgyn.com>
Authored: Wed Oct 26 20:45:48 2016 +0000
Committer: selvaganesang <se...@esgyn.com>
Committed: Wed Oct 26 20:45:48 2016 +0000

----------------------------------------------------------------------
 .gitignore                                      |   1 +
 core/Makefile                                   |  54 +-
 core/conn/odbc/src/odbc/nsksrvr/SrvrConnect.cpp |  26 +
 .../odbc/src/odbc/nsksrvrcore/srvrothers.cpp    |   1 +
 core/sqf/monitor/linux/cluster.cxx              | 104 +++-
 core/sqf/monitor/linux/internal.h               |   3 +-
 core/sqf/monitor/linux/monitor.cxx              |   1 +
 core/sqf/monitor/linux/pnode.cxx                |   2 -
 core/sqf/monitor/linux/pnode.h                  |   7 +-
 core/sqf/monitor/linux/zclient.cxx              |  41 ++
 core/sqf/sqenvcom.sh                            |  12 +-
 core/sqf/sql/scripts/install_local_hadoop       |  14 +-
 core/sqf/src/seatrans/hbase-trx/Makefile        |   6 +-
 .../sqf/src/seatrans/hbase-trx/pom.xml.apache10 |   2 +-
 .../sqf/src/seatrans/hbase-trx/pom.xml.apache11 |   2 +-
 .../sqf/src/seatrans/hbase-trx/pom.xml.apache12 |   2 +-
 .../transactional/TrxRegionEndpoint.java.tmpl   |   2 +-
 core/sql/regress/executor/DIFF107.KNOWN.SB      |  16 -
 core/sql/regress/executor/DIFF107.KNOWN.SB.OS   |  14 -
 core/sql/regress/executor/EXPECTED107           | 565 ++++++++++++++++++
 core/sql/regress/executor/EXPECTED107.LINUX     | 574 -------------------
 core/sql/regress/executor/TEST107               |  51 +-
 core/sql/regress/privs2/EXPECTED144             | Bin 0 -> 59186 bytes
 core/sql/regress/privs2/LOG144                  | Bin 0 -> 17980 bytes
 core/sql/regress/privs2/TEST144                 | 241 ++++++++
 core/sql/regress/privs2/udfs.cpp                | 174 ++++++
 core/sql/regress/udr/TEST103                    |   2 +-
 core/sql/sort/SortTopN.cpp                      |   8 +
 core/sql/sqludr/SqlUdrPredefLogReader.cpp       | 482 ++++++++++++++--
 core/trafodion.spec                             | 114 ++++
 30 files changed, 1766 insertions(+), 755 deletions(-)
----------------------------------------------------------------------