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

[5/9] incubator-trafodion git commit: Documenation update for DCS and REST server Minor fixes in scripts

Documenation update for DCS and REST server
Minor fixes in scripts


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

Branch: refs/heads/master
Commit: 449f48ae3935d87f1523af74613dff683e55be09
Parents: d457ac0
Author: Anuradha Hegde <an...@esgyn.com>
Authored: Mon Oct 24 18:15:55 2016 +0000
Committer: Anuradha Hegde <an...@esgyn.com>
Committed: Mon Oct 24 18:15:55 2016 +0000

----------------------------------------------------------------------
 core/rest/src/main/asciidoc/_chapters/apis.adoc | 60 +++++++++++++++-----
 core/rest/src/main/asciidoc/index.adoc          |  4 +-
 core/sqf/sql/scripts/cleanlogs                  |  7 +++
 core/sqf/sql/scripts/install_traf_components    |  3 +-
 .../main/asciidoc/_chapters/configuration.adoc  | 17 +++---
 .../asciidoc/_chapters/troubleshooting.adoc     | 18 +++++-
 dcs/src/main/resources/dcs-default.xml          |  2 +-
 .../src/asciidoc/_chapters/requirements.adoc    |  2 +-
 8 files changed, 83 insertions(+), 30 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/449f48ae/core/rest/src/main/asciidoc/_chapters/apis.adoc
----------------------------------------------------------------------
diff --git a/core/rest/src/main/asciidoc/_chapters/apis.adoc b/core/rest/src/main/asciidoc/_chapters/apis.adoc
index d561b85..21980b4 100644
--- a/core/rest/src/main/asciidoc/_chapters/apis.adoc
+++ b/core/rest/src/main/asciidoc/_chapters/apis.adoc
@@ -157,11 +157,30 @@ Response Body:
    }
 }
 ----
-
-== Example Usage
-There are many ways/languages to use the REST API's. The following examples use the curl command line interface to do the REST GET calls.
-
-In this example the user wishes to know the status of all Trafodion resources.
+== Supported REST APIs
+There are many ways/languages to use the REST API's. The following examples use the curl command line interface to do the REST calls.
+
+[cols="15%,10%,40%,35%"]
+|===
+| *EndPoint*          | *HTTP Verb*  | *Description*                 | *Example*
+| /servers           | GET          | Displays the status of various Trafodion components |<<server-status,Status of Trafodion components>>
+| /dtm        | GET          | Displays the status of Distributed Transaction Manager(DTM) |<<dtm-status, Status of DTM>>
+| /rms        | GET          | Displays the status of Runtime Management Statistics(RMS) |<<rms-status, Status of RMS>>
+| /dcs        | GET          | Displays the status of Database Connectivity Servers(DCS) |<<dcs-status,Status of DCS>>
+| /dcs/summary        | GET          | Displays the configuration information of Database Connectivity Servers(DCS) |<<summary-status, DCS configuration information>>
+| /dcs/connections        | GET          | Displays the client/server information of Database Connectivity Servers(DCS) from zookeeper |<<dcs-connection-status, Client-Server information>>
+| /nodes        | GET          | Displays the status of Trafodion nodes |<<node-status,Status of nodes>>
+| /pstack       | GET          | Displays the call stack for a collection of Trafodion processes |<<pstack-process, Various call stack information>>
+| /pstack/program/{program}   | GET          | Displays call stack for a specific Trafodion process |<<pstack-per-process, Call stack of a specific process>>
+| /jstack/program/{program}   | GET          | Displays call stack for a specific java process |<<jstack-process, Call stack of java process>>
+| /transactions     | GET          | Displays the status of Distributed Transaction manager(DTM) |<<dtm-transactions,Status of transactions >>
+| /transactions/stats    | GET          | Displays the status of Distributed Transaction manager(DTM) service statistics |<<dtm-service-stats, Service statistics of transactions>>
+|===
+
+<<<
+[[server-status]]
+=== Displays the status of various components
+In this example the user wishes to know the status of all Trafodion components.
 This a jsonized version of the _sqcheck -c all_ command.
 
 .Http command
@@ -201,7 +220,8 @@ curl  -X GET -H "Accept: application/json" http://{hostname}:4200/v1/servers/
   ]
 }
 ----
-
+[[dtm-status]]
+=== Displays the status of Distributed Transaction Manager(DTM)
 In this example the user wishes to know the status of Trafodion DTM.
 This a jsonized version of the _sqcheck -c dtm_ command.
 
@@ -212,7 +232,7 @@ curl  -X GET -H "Accept: application/json" http://{hostname}:4200/v1/servers/dtm
 
 .Response
 ----
-{
+
   "STATE":"UP",
   "SUBSTATE":"OPERATIONAL",
   "PROCESSES":
@@ -226,7 +246,8 @@ curl  -X GET -H "Accept: application/json" http://{hostname}:4200/v1/servers/dtm
   ]
 }
 ----
-
+[[rms-status]]
+=== Status of RMS
 In this example the user wishes to know the status of Trafodion RMS. 
 This a jsonized version of the _sqcheck -c rms_ command.
 
@@ -252,7 +273,8 @@ curl  -X GET -H "Accept: application/json" http://{hostname}:4200/v1/servers/rms
   ]
 }
 ----
-
+[[dcs-status]]
+=== Status of Database Connectivity Service (DCS)
 In this example the user wishes to know the status of Trafodion DCS components. 
 This a jsonized version of the _sqcheck -c dcs_ command.
 
@@ -283,7 +305,8 @@ curl  -X GET -H "Accept: application/json" http://{hostname}:4200/v1/servers/dcs
   ]
 }
 ----
-
+[[summary-status]]
+=== Summary of DCS Configuration
 In this example the user wishes to see a summary of the Trafodion DCS configuration.
 The server retrieves this information by executing dcscheck script.
 
@@ -303,6 +326,8 @@ curl  -X GET -H "Accept: application/json" http://{hostname}:4200/v1/servers/dcs
   "Active DcsMaster": "\"node1\", pid 8526"
 }
 ----
+[[dcs-connection-status]]
+=== Displays the client/server information 
 
 In this example the user wishes to see the Trafodion DCS server/client connection information.
 The server retrieves this information from ZooKeeper.
@@ -349,7 +374,8 @@ curl  -X GET -H "Accept: application/json" http://{hostname}:4200/v1/servers/dcs
   }
 ]
 ----
-
+[[node-status]]
+=== Displays status of Trafodion nodes
 In this example the user wishes to know the status of Trafodion nodes. 
 This is a jsonized version of the _sqnodestatus_ command.
 
@@ -379,7 +405,8 @@ curl  -X GET -H "Accept: application/json" http://{hostname}:4200/v1/servers/nod
   }
 ]
 ----
-
+[[pstack-process]]
+=== Gets the collection of stack for various Trafodion process
 In this example the user wishes to see the call stack for a collection of Trafodion processes. 
 This is a jsonized version of the _sqpstack_ command. Newlines are added to all lines
 in the response so clients can recognize each end of line.
@@ -545,6 +572,8 @@ curl  -X GET -H "Accept: application/json" http://{hostname}:4200/v1/servers/pst
   #3  0x000000000041c48a in CCluster::exchangeNodeData() ()\n
   #4  0x0000000000409c9c in main ()\n"}]
 ----
+[[pstack-per-process]]
+=== Displays call stack information for a specific process
 
 In this example the user wishes to see the call stack for Trafodion process id 20642. 
 This is a jsonized version of the _sqpstack [<program>]_ command. Newlines are added to all lines
@@ -628,6 +657,8 @@ curl  -X GET -H "Accept: application/json" http://{hostname}:4200/v1/servers/pst
   }
 ]
 ----
+[[jstack-process]]
+=== Displays the call stack for a specific java process
 
 In this example the user wishes to see the call Java stack for Trafodion process id 20642. 
 This is a jsonized version of the _jstack [<program>]_ command. Newlines are added to all lines
@@ -765,7 +796,8 @@ curl  -X GET -H "Accept: application/json" http://{hostname}:4200/v1/servers/jst
   }
 ]
 ----
-
+[[dtm-transactions]]
+=== Displays status of transactions
 In this example the user wishes to know the status of Trafodion DTM service. 
 This is a jsonized version of the _dtmci status tm_ command.
 
@@ -795,6 +827,8 @@ curl  -X GET -H "Accept: application/json" http://{hostname}:4200/v1/transaction
   }
 ]
 ----
+[[dtm-service-stats]]
+=== Displays the transaction service statistics
 
 In this example the user wishes to know the Trafodion DTM service statistics. 
 This is a jsonized version of the _dtmci stats_ command.

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/449f48ae/core/rest/src/main/asciidoc/index.adoc
----------------------------------------------------------------------
diff --git a/core/rest/src/main/asciidoc/index.adoc b/core/rest/src/main/asciidoc/index.adoc
index 166cbc4..6670502 100644
--- a/core/rest/src/main/asciidoc/index.adoc
+++ b/core/rest/src/main/asciidoc/index.adoc
@@ -68,11 +68,11 @@ under the License.
 
 include::_chapters/preface.adoc[]
 include::_chapters/getting_started.adoc[]
-include::_chapters/configuration.adoc[]
 include::_chapters/architecture.adoc[]
+include::_chapters/configuration.adoc[]
 include::_chapters/apis.adoc[]
 include::_chapters/troubleshooting.adoc[]
 
 = Appendix
 
-include::_chapters/appendix_contributing_to_documentation.adoc[]
\ No newline at end of file
+include::_chapters/appendix_contributing_to_documentation.adoc[]

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/449f48ae/core/sqf/sql/scripts/cleanlogs
----------------------------------------------------------------------
diff --git a/core/sqf/sql/scripts/cleanlogs b/core/sqf/sql/scripts/cleanlogs
index 2bbc0ec..76ac55e 100755
--- a/core/sqf/sql/scripts/cleanlogs
+++ b/core/sqf/sql/scripts/cleanlogs
@@ -44,6 +44,9 @@ function core_logs() {
    $L_PDSH "rm -f ${MY_SQROOT}/logs/*.log"
    $L_PDSH "rm -f ${MY_SQROOT}/logs/*log.[0-9]*"
    $L_PDSH "rm -f ${MY_SQROOT}/sql/scripts/stdout_*"
+ else
+   rm -f ${MY_SQROOT}/logs/*
+   rm -f ${MY_SQROOT}/sql/scripts/stdout_*
  fi
 }
 
@@ -53,6 +56,8 @@ function dcs_logs() {
    $L_PDSH "rm -f ${DCS_INSTALL_DIR}/logs/*.log.[0-9]*"
    $L_PDSH "rm -f ${DCS_INSTALL_DIR}/logs/*.out"
    $L_PDSH "rm -f ${DCS_INSTALL_DIR}/logs/*.out.[0-9]*"
+ else
+   rm -f ${DCS_INSTALL_DIR}/logs/*
  fi
 }
 
@@ -62,6 +67,8 @@ function rest_logs() {
    $L_PDSH "rm -f ${REST_INSTALL_DIR}/logs/*.log.[0-9]*"
    $L_PDSH "rm -f ${REST_INSTALL_DIR}/logs/*.out"
    $L_PDSH "rm -f ${REST_INSTALL_DIR}/logs/*.out.[0-9]*"
+ else
+   rm -f ${REST_INSTALL_DIR}/logs/*
  fi
 }
 

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/449f48ae/core/sqf/sql/scripts/install_traf_components
----------------------------------------------------------------------
diff --git a/core/sqf/sql/scripts/install_traf_components b/core/sqf/sql/scripts/install_traf_components
index 709ff99..cd8e8af 100755
--- a/core/sqf/sql/scripts/install_traf_components
+++ b/core/sqf/sql/scripts/install_traf_components
@@ -334,7 +334,8 @@ elif [[ \$1 == "t2" ]]
 then
   export LD_PRELOAD=\$JAVA_HOME/jre/lib/amd64/libjsig.so:\$MY_SQROOT/export/lib\$SQ_MBTYPE/libseabasesig.so
   ./phoenix_test.py --targettype=TR --javahome=\$JAVA_HOME \\
-     --jdbccp=\$MY_SQROOT/export/lib/jdbcT2.jar --jdbctype=T2
+     --jdbccp=\$MY_SQROOT/export/lib/jdbcT2.jar --jdbctype=T2 \\
+     --nomvntest --tests="AlterTableTest,ArithmeticQueryTest,BinaryRowKeyTest,CoalesceFunctionTest,CompareDecimalToLongTest,CustomEntityDataTest,DeleteRangeTest,DescColumnSortOrderTest,DistinctCountTest,ExtendedQueryExecTest,FunkyNamesTest,IsNullTest,OrderByTest,QueryExecTest,SaltedTableTest,SaltedTableUpsertSelectTest,SaltedTableVarLengthRowKeyTest,SkipScanQueryTest,UpsertSelectAutoCommitTest,UpsertSelectTest,UpsertValuesTest],AutoCommitTest,CreateTableTest,ExecuteStatementsTest,GroupByCaseTest,IndexTest,KeyOnlyTest,MultiCfQueryExecTest,ProductMetricsTest,QueryExecWithoutSCNTest,QueryPlanTest,ReadIsolationLevelTest,ServerExceptionTest,StatementHintsTest,StddevTest,ToCharFunctionTest,ToNumberFunctionTest,TopNTest,UpsertBigValuesTest,VariableLengthPKTest,SaltedTableUpsertSelectTest"
 else
   echo "Usage: swphoenix (t2|t4)"
   exit 1

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/449f48ae/dcs/src/main/asciidoc/_chapters/configuration.adoc
----------------------------------------------------------------------
diff --git a/dcs/src/main/asciidoc/_chapters/configuration.adoc b/dcs/src/main/asciidoc/_chapters/configuration.adoc
index 0eed4a5..bdb8294 100644
--- a/dcs/src/main/asciidoc/_chapters/configuration.adoc
+++ b/dcs/src/main/asciidoc/_chapters/configuration.adoc
@@ -306,23 +306,20 @@ include::../../../../target/asciidoc/dcs-default.adoc[]
 Set DCS environment variables in this file. Examples include options to pass the JVM on start of
 an DCS daemon such as heap size and garbage collector configs. You can also set configurations for DCS configuration, log directories,
 niceness, ssh options, where to locate process pid files, etc. Open the file at _conf/dcs-env.sh_ and peruse its content.
-Each option is fairly well documented.  Add your own environment variables here if you want them read by DCS daemons on startup.
-  
-Changes here will require a cluster restart for DCS to notice the change.
+Each option is fairly well documented.  Add your own environment variables here if you want them read by DCS daemons on startup. Changes done to this file requires restart of DCS.
  
 === _log4j.properties_
 
-Edit this file to change rate at which DCS files are rolled and to change the level at which DCS logs messages.
-   
-Changes here will require a cluster restart for DCS to notice the change though log levels can be changed for 
-particular daemons via the DCS UI.
+Edit this file to change rate at which DCS files are rolled over and, to change the level at which DCS logs messages. Changes done to this file will require restart of DCS.
 
 === _master_ 
-A plain-text file which lists host on which the primary master process should be started. Only one host allowed to be the 
-primary master
+A plain-text file which lists hostname or host IP address  on which the primary master process should be started. Only one host is allowed to be the primary master
 
 === _backup-masters_ 
 A plain-text file which lists hosts on which the backup master process should be started. Only one host per line is allowed
+
+=== _servers_
+A plain-text file which lists hosts on which the DcsServer server process should be started. Only one host per line or the host name followed by the count or number of master executor servers. All servers listed in this file will be started and stopped when DCS start or stop is run.
  
 == Example Configurations 
 
@@ -468,4 +465,4 @@ There is no default value. You must ensure the value contains the correct interf
 === `dcs.master.floating.ip.external.ip.address`
 There is no default value. It is important that you set this to the dotted IP address appropriate for your network.
           
-To change this configuration, edit _dcs-site.xml_, copy the changed file to all nodes in the cluster and restart dcs.
\ No newline at end of file
+To change this configuration, edit _dcs-site.xml_, copy the changed file to all nodes in the cluster and restart dcs.

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/449f48ae/dcs/src/main/asciidoc/_chapters/troubleshooting.adoc
----------------------------------------------------------------------
diff --git a/dcs/src/main/asciidoc/_chapters/troubleshooting.adoc b/dcs/src/main/asciidoc/_chapters/troubleshooting.adoc
index 6a74484..9f94853 100644
--- a/dcs/src/main/asciidoc/_chapters/troubleshooting.adoc
+++ b/dcs/src/main/asciidoc/_chapters/troubleshooting.adoc
@@ -58,7 +58,7 @@ The DcsMaster web UI allows navigation to each DcsServer's web UI.
               
 [[trouble-tools-builtin-webserver]]
 ==== DcsServer Web Interface
-DcsServers starts a web-interface on port 24420 by default.
+DcsServers starts a web-interface on port 24410 by default.
               
 The DcsServer web UI lists its server metrics (build info, zookeeper quorum, usedHeap, maxHeap, etc.).
 
@@ -151,4 +151,18 @@ See the link:http://wiki.apache.org/hadoop/ZooKeeper/Troubleshooting[ZooKeeper O
 It has suggestions and tools for checking disk and networking performance; i.e. the operating environment your ZooKeeper 
 and DCS are running in.
 
-Additionally, the utility <<trouble-tools-builtin-zkcli,zkcli>> may help investigate ZooKeeper issues.
\ No newline at end of file
+Additionally, the utility <<trouble-tools-builtin-zkcli,zkcli>> may help investigate ZooKeeper issues.
+
+[[trouble-ha]]
+== High Availability
+On Linux cluster, if you run into issues please check dcs log files located in $DCS_INSTALL_DIR/logs folder. 
+
+Validate that the interace is set up correctly. This command should only show one additional interface for HA configuration
+----
+pdsh $MY_NODES "/sbin/ip addr show |grep 23400"
+----
+
+Validate to get the list of  all the DcsMaster that are configured and started in the cluster
+----
+pdsh $MY_NODES $JAVA_HOME/bin/jps |grep -i dcsmaster
+----

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/449f48ae/dcs/src/main/resources/dcs-default.xml
----------------------------------------------------------------------
diff --git a/dcs/src/main/resources/dcs-default.xml b/dcs/src/main/resources/dcs-default.xml
index cdff47f..c8e4590 100644
--- a/dcs/src/main/resources/dcs-default.xml
+++ b/dcs/src/main/resources/dcs-default.xml
@@ -124,7 +124,7 @@
   </property>         
   <property>
     <name>dcs.server.info.port</name>
-    <value>40030</value>
+    <value>24410</value>
     <description>The port for the DcsServer web UI
     Set to -1 if you do not want the server UI to run.
     </description>

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/449f48ae/docs/provisioning_guide/src/asciidoc/_chapters/requirements.adoc
----------------------------------------------------------------------
diff --git a/docs/provisioning_guide/src/asciidoc/_chapters/requirements.adoc b/docs/provisioning_guide/src/asciidoc/_chapters/requirements.adoc
index 1cfa12b..62ebbf4 100644
--- a/docs/provisioning_guide/src/asciidoc/_chapters/requirements.adoc
+++ b/docs/provisioning_guide/src/asciidoc/_chapters/requirements.adoc
@@ -131,7 +131,7 @@ The following table lists the default ports used by the different {project-name}
 | 4201         | rest-site.xml      | trafodion.rest.https.port       | Yes      | 1     | HTTPS    | {project-name} REST Server (HTTPS).
 | 23400        | dcs-site.xml       | dcs.master.port                 | Yes      | _n_   | binary   | Start of {project-name} DCS port range. (37800 for {project-name} 1.1)
 | 24400        | dcs-site.xml       | dcs.master.info.port            | Yes      | 1     | HTTP     | DCS master web GUI. (40010 for {project-name} 1.1)
-| 24410        | dcs-site.xml       | dcs.server.info.port            | Yes      | _n_   | HTTP     | Start of range for DCS server web GUIs. (40020 for {project-name} 1.1)
+| 24410        | dcs-site.xml       | dcs.server.info.port            | Yes      | _n_   | HTTP     | Start of range for DCS server web GUIs. (40030 for {project-name} 1.1)
 | 50030        | mapred-site.xml    | mapred.job.tracker.http.address | No       | 1     | HTTP     | MapReduce Job Tracker web GUI.
 | 50070        | hdfs-site.xml      | dfs.http.address                | No       | 1     | HTTP     | HDFS Name Node web GUI.
 | 50075        | hdfs-site.xml      | dfs.datanode.http.address       | No       | 1     | HTTP     | HDFS Data Node web GUI.