You are viewing a plain text version of this content. The canonical link for it is here.
Posted to codereview@trafodion.apache.org by zcorrea <gi...@git.apache.org> on 2018/02/02 02:04:32 UTC

[GitHub] trafodion pull request #1437: [TRAFODION-2650] Restructured Trafodion Config...

GitHub user zcorrea opened a pull request:

    https://github.com/apache/trafodion/pull/1437

    [TRAFODION-2650] Restructured Trafodion Configuration code into separate

    directory structure.
    
    Move code out of monitor source tree into its own directory structure. Move Trafodion Configuration API header file into the export/include/trafconf directory.

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/zcorrea/trafodion TRAFODION-2650

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/trafodion/pull/1437.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #1437
    
----
commit 87849fcf8199857e0c525d332a061db8744c86cb
Author: Zalo Correa <za...@...>
Date:   2018-02-02T01:51:35Z

    [TRAFODION-2650] Restructured Trafodion Configuration code into separate
    directory structure.

----


---

[GitHub] trafodion pull request #1437: [TRAFODION-2650] Reorganized Trafodion Configu...

Posted by DaveBirdsall <gi...@git.apache.org>.
Github user DaveBirdsall commented on a diff in the pull request:

    https://github.com/apache/trafodion/pull/1437#discussion_r166125011
  
    --- Diff: core/sqf/export/include/trafconf/trafconfig.h ---
    @@ -67,26 +68,64 @@
     #define PERSIST_RETRIES_KEY        "PERSIST_RETRIES"
     #define PERSIST_ZONES_KEY          "PERSIST_ZONES"
     
    -enum TC_STORAGE_TYPE {
    +#define TC_ROOT_NODE               "/trafodion"
    +#define TC_INSTANCE_NODE           "/instance"
    +
    +typedef enum {
    +    ProcessType_Undefined=0,                // No process type as been defined
    +    ProcessType_TSE,                        // Identifies a Table Storage Engine (DP2)
    +    ProcessType_DTM,                        // Identifies a Distributed Transaction Monitor process
    +    ProcessType_ASE,                        // Identifies a Audit Storage Engine (ADP)
    +    ProcessType_Generic,                    // Identifies a generic process
    +    ProcessType_Watchdog,                   // Identifies the monitor's watchdog processes
    +    ProcessType_AMP,                        // Identifies a AMP process
    --- End diff --
    
    Is this used anymore?


---

[GitHub] trafodion pull request #1437: [TRAFODION-2650] Reorganized Trafodion Configu...

Posted by DaveBirdsall <gi...@git.apache.org>.
Github user DaveBirdsall commented on a diff in the pull request:

    https://github.com/apache/trafodion/pull/1437#discussion_r166125170
  
    --- Diff: core/sqf/export/include/trafconf/trafconfig.h ---
    @@ -67,26 +68,64 @@
     #define PERSIST_RETRIES_KEY        "PERSIST_RETRIES"
     #define PERSIST_ZONES_KEY          "PERSIST_ZONES"
     
    -enum TC_STORAGE_TYPE {
    +#define TC_ROOT_NODE               "/trafodion"
    +#define TC_INSTANCE_NODE           "/instance"
    +
    +typedef enum {
    +    ProcessType_Undefined=0,                // No process type as been defined
    +    ProcessType_TSE,                        // Identifies a Table Storage Engine (DP2)
    +    ProcessType_DTM,                        // Identifies a Distributed Transaction Monitor process
    +    ProcessType_ASE,                        // Identifies a Audit Storage Engine (ADP)
    +    ProcessType_Generic,                    // Identifies a generic process
    +    ProcessType_Watchdog,                   // Identifies the monitor's watchdog processes
    +    ProcessType_AMP,                        // Identifies a AMP process
    +    ProcessType_Backout,                    // Identifies a Backout process
    +    ProcessType_VolumeRecovery,             // Identifies a Volume Recovery process
    +    ProcessType_MXOSRVR,                    // Identifies a MXOSRVR process
    +    ProcessType_SPX,                        // Identifies a SeaPilot ProXy process
    +    ProcessType_SSMP,                       // Identifies a SQL Statistics Merge Process (SSMP)
    +    ProcessType_PSD,                        // Identifies the monitor's process start daemon processes
    +    ProcessType_SMS,                        // Identifies a SeaMonster Service process
    --- End diff --
    
    Is this used anymore?


---

[GitHub] trafodion pull request #1437: [TRAFODION-2650] Reorganized Trafodion Configu...

Posted by DaveBirdsall <gi...@git.apache.org>.
Github user DaveBirdsall commented on a diff in the pull request:

    https://github.com/apache/trafodion/pull/1437#discussion_r166124919
  
    --- Diff: core/sqf/export/include/trafconf/trafconfig.h ---
    @@ -67,26 +68,64 @@
     #define PERSIST_RETRIES_KEY        "PERSIST_RETRIES"
     #define PERSIST_ZONES_KEY          "PERSIST_ZONES"
     
    -enum TC_STORAGE_TYPE {
    +#define TC_ROOT_NODE               "/trafodion"
    +#define TC_INSTANCE_NODE           "/instance"
    +
    +typedef enum {
    +    ProcessType_Undefined=0,                // No process type as been defined
    +    ProcessType_TSE,                        // Identifies a Table Storage Engine (DP2)
    +    ProcessType_DTM,                        // Identifies a Distributed Transaction Monitor process
    +    ProcessType_ASE,                        // Identifies a Audit Storage Engine (ADP)
    --- End diff --
    
    Is this used anymore?


---

[GitHub] trafodion pull request #1437: [TRAFODION-2650] Reorganized Trafodion Configu...

Posted by DaveBirdsall <gi...@git.apache.org>.
Github user DaveBirdsall commented on a diff in the pull request:

    https://github.com/apache/trafodion/pull/1437#discussion_r166125045
  
    --- Diff: core/sqf/export/include/trafconf/trafconfig.h ---
    @@ -67,26 +68,64 @@
     #define PERSIST_RETRIES_KEY        "PERSIST_RETRIES"
     #define PERSIST_ZONES_KEY          "PERSIST_ZONES"
     
    -enum TC_STORAGE_TYPE {
    +#define TC_ROOT_NODE               "/trafodion"
    +#define TC_INSTANCE_NODE           "/instance"
    +
    +typedef enum {
    +    ProcessType_Undefined=0,                // No process type as been defined
    +    ProcessType_TSE,                        // Identifies a Table Storage Engine (DP2)
    +    ProcessType_DTM,                        // Identifies a Distributed Transaction Monitor process
    +    ProcessType_ASE,                        // Identifies a Audit Storage Engine (ADP)
    +    ProcessType_Generic,                    // Identifies a generic process
    +    ProcessType_Watchdog,                   // Identifies the monitor's watchdog processes
    +    ProcessType_AMP,                        // Identifies a AMP process
    +    ProcessType_Backout,                    // Identifies a Backout process
    +    ProcessType_VolumeRecovery,             // Identifies a Volume Recovery process
    --- End diff --
    
    Is this used anymore?


---

[GitHub] trafodion pull request #1437: [TRAFODION-2650] Reorganized Trafodion Configu...

Posted by DaveBirdsall <gi...@git.apache.org>.
Github user DaveBirdsall commented on a diff in the pull request:

    https://github.com/apache/trafodion/pull/1437#discussion_r166124806
  
    --- Diff: core/sqf/export/include/trafconf/trafconfig.h ---
    @@ -67,26 +68,64 @@
     #define PERSIST_RETRIES_KEY        "PERSIST_RETRIES"
     #define PERSIST_ZONES_KEY          "PERSIST_ZONES"
     
    -enum TC_STORAGE_TYPE {
    +#define TC_ROOT_NODE               "/trafodion"
    +#define TC_INSTANCE_NODE           "/instance"
    +
    +typedef enum {
    +    ProcessType_Undefined=0,                // No process type as been defined
    +    ProcessType_TSE,                        // Identifies a Table Storage Engine (DP2)
    --- End diff --
    
    Is this used anymore?


---

[GitHub] trafodion pull request #1437: [TRAFODION-2650] Reorganized Trafodion Configu...

Posted by DaveBirdsall <gi...@git.apache.org>.
Github user DaveBirdsall commented on a diff in the pull request:

    https://github.com/apache/trafodion/pull/1437#discussion_r166125102
  
    --- Diff: core/sqf/export/include/trafconf/trafconfig.h ---
    @@ -67,26 +68,64 @@
     #define PERSIST_RETRIES_KEY        "PERSIST_RETRIES"
     #define PERSIST_ZONES_KEY          "PERSIST_ZONES"
     
    -enum TC_STORAGE_TYPE {
    +#define TC_ROOT_NODE               "/trafodion"
    +#define TC_INSTANCE_NODE           "/instance"
    +
    +typedef enum {
    +    ProcessType_Undefined=0,                // No process type as been defined
    +    ProcessType_TSE,                        // Identifies a Table Storage Engine (DP2)
    +    ProcessType_DTM,                        // Identifies a Distributed Transaction Monitor process
    +    ProcessType_ASE,                        // Identifies a Audit Storage Engine (ADP)
    +    ProcessType_Generic,                    // Identifies a generic process
    +    ProcessType_Watchdog,                   // Identifies the monitor's watchdog processes
    +    ProcessType_AMP,                        // Identifies a AMP process
    +    ProcessType_Backout,                    // Identifies a Backout process
    +    ProcessType_VolumeRecovery,             // Identifies a Volume Recovery process
    +    ProcessType_MXOSRVR,                    // Identifies a MXOSRVR process
    +    ProcessType_SPX,                        // Identifies a SeaPilot ProXy process
    --- End diff --
    
    Is this used anymore?


---

[GitHub] trafodion pull request #1437: [TRAFODION-2650] Reorganized Trafodion Configu...

Posted by zcorrea <gi...@git.apache.org>.
Github user zcorrea commented on a diff in the pull request:

    https://github.com/apache/trafodion/pull/1437#discussion_r166396386
  
    --- Diff: core/sqf/sqenvcom.sh ---
    @@ -47,6 +47,15 @@ export PRODUCT_COPYRIGHT_HEADER="2015-2017 Apache Software Foundation"
     ##############################################################
     export TRAFODION_ENABLE_AUTHENTICATION=${TRAFODION_ENABLE_AUTHENTICATION:-NO}
     
    +# Set the Trafodion Configuration store type
    +if [[ -n "$CLUSTERNAME" ]]; then
    +  # This is a cluster environment, not a workstation
    +  #export TRAF_CONFIG_DBSTORE=MySQL
    +  export TRAF_CONFIG_DBSTORE=Sqlite
    +else
    +  export TRAF_CONFIG_DBSTORE=Sqlite
    --- End diff --
    
    This is an initial step to prepare the code base before adding the MySQL storage method.


---

[GitHub] trafodion pull request #1437: [TRAFODION-2650] Reorganized Trafodion Configu...

Posted by zcorrea <gi...@git.apache.org>.
Github user zcorrea commented on a diff in the pull request:

    https://github.com/apache/trafodion/pull/1437#discussion_r166395920
  
    --- Diff: core/sqf/export/include/trafconf/trafconfig.h ---
    @@ -67,26 +68,64 @@
     #define PERSIST_RETRIES_KEY        "PERSIST_RETRIES"
     #define PERSIST_ZONES_KEY          "PERSIST_ZONES"
     
    -enum TC_STORAGE_TYPE {
    +#define TC_ROOT_NODE               "/trafodion"
    +#define TC_INSTANCE_NODE           "/instance"
    +
    +typedef enum {
    +    ProcessType_Undefined=0,                // No process type as been defined
    +    ProcessType_TSE,                        // Identifies a Table Storage Engine (DP2)
    --- End diff --
    
    No, and to remove them will require additional work in the Seabed layer. Perhaps another JIRA to address this code cleanup here and other areas will be necessary,


---

[GitHub] trafodion pull request #1437: [TRAFODION-2650] Reorganized Trafodion Configu...

Posted by asfgit <gi...@git.apache.org>.
Github user asfgit closed the pull request at:

    https://github.com/apache/trafodion/pull/1437


---

[GitHub] trafodion pull request #1437: [TRAFODION-2650] Reorganized Trafodion Configu...

Posted by DaveBirdsall <gi...@git.apache.org>.
Github user DaveBirdsall commented on a diff in the pull request:

    https://github.com/apache/trafodion/pull/1437#discussion_r166126270
  
    --- Diff: core/sqf/sqenvcom.sh ---
    @@ -47,6 +47,15 @@ export PRODUCT_COPYRIGHT_HEADER="2015-2017 Apache Software Foundation"
     ##############################################################
     export TRAFODION_ENABLE_AUTHENTICATION=${TRAFODION_ENABLE_AUTHENTICATION:-NO}
     
    +# Set the Trafodion Configuration store type
    +if [[ -n "$CLUSTERNAME" ]]; then
    +  # This is a cluster environment, not a workstation
    +  #export TRAF_CONFIG_DBSTORE=MySQL
    +  export TRAF_CONFIG_DBSTORE=Sqlite
    +else
    +  export TRAF_CONFIG_DBSTORE=Sqlite
    --- End diff --
    
    Looks like it is aways Sqlite. Why bother with the "if"? Earlier I saw mention in the code that Sqlite is deprecated. Is that still the case?


---