[
https://issues.apache.org/jira/browse/TRAFODION-2306?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15603932#comment-15603932
]
ASF GitHub Bot commented on TRAFODION-2306:
-------------------------------------------
Github user selvaganesang commented on a diff in the pull request:
https://github.com/apache/incubator-trafodion/pull/777#discussion_r84820940
--- Diff: core/sql/src/main/java/org/trafodion/sql/TrafConfiguration.java
---
@@ -0,0 +1,70 @@
+/**
+ * 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;
+import org.apache.hadoop.fs.Path;
+import java.util.Iterator;
+import java.util.Map;
+
+/**
+ * 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) {
+ Configuration lv_conf = new Configuration();
+ String trafSiteXml = new String(System.getenv("MY_SQROOT") +
"/etc/trafodion-site.xml");
--- End diff --
Possible. My thinking is that it would be easier to track which resource
file was effective if it is limited to a known directory. In addition this file
is configured with predefined properties as part of sqgen when trafodion is
installed or upgraded.
> Trafodion customization using its own configuration file.
> ---------------------------------------------------------
>
> Key: TRAFODION-2306
> URL: https://issues.apache.org/jira/browse/TRAFODION-2306
> Project: Apache Trafodion
> Issue Type: Improvement
> Components: dtm, sql-general
> Reporter: Selvaganesan Govindarajan
> Assignee: Selvaganesan Govindarajan
>
> From: Selva Govindarajan [mailto:[email protected]]
> Sent: Friday, October 21, 2016 6:15 PM
> To: [email protected]
> Subject: [DISCUSS] Introducing Trafodion customization using its own
> configuration file.
>
> Currently Trafodion uses the standard client side Hbase configuration
> file hbase-site.xml deployed by the distros. It is found that there are
> variations in this configuration file between distros. At times, the distro
> manager decides that a given property is not a client property and it is not
> added to the deployed hbase client configuration file. In addition, there are
> certain properties like hbase.coprocessor.region.classes need to be
> configured for Trafodion tables for the transaction management. Hence, I am
> planning to introduce a configuration file traf-site.xml specific to
> Trafodion similar to hbase configuration file hbase-site.xml. This
> configuration file extends the properties inherited from the standard
> hbase-site.xml.
>
> By default, the traf-site.xml comes with the following properties
>
> <?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>
>
> This property file will be installed if it doesn't exist at
> $MY_SQROOT/etc directory when sqgen is done. Any client side property can be
> added to this file and the client connections from Trafodion client processes
> will inherit them.
>
> The hbase.coprocessor.region.classes are added as Table co-processor to
> the table descriptor when a Trafodion table is created. Trafodion installer
> will not be adding to these properties to hbase configuration file soon.
>
> Please feel free to provide your valuable suggestions/comments.
>
> Thanks
> Selva
>
>
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)