Excerpt |
---|
Contains how-to information referenced from other chapters in this guide. |
...
Table of Contents | ||||
---|---|---|---|---|
|
...
Anchor | ||||
---|---|---|---|---|
|
Source Download
Include Page | ||||
---|---|---|---|---|
|
Anchor | ||||
---|---|---|---|---|
|
Git Cheat Sheet
Download Git Tools
Refer to Git Tools Download.
Set-Up Git Environment
Refer to GitHub Documentation
Setup ssh Keys
Refer to ssh Keys.
Fork Trafodion Source Tree
Code Block | ||||
---|---|---|---|---|
| ||||
trafdeveloper_fork |
Clone Repository
Do the following:
Code Block | ||
---|---|---|
| ||
# Move to the directory where you want to install the Trafodion source code. cd mysource # Clone the Trafodion source code git clone git://gitgithub.com/apache.org/incubator-trafodion.git # Change to the source-tree directory cd trafodion # Register your fork as a remote branch git remote add <your-gitgithub-id>_fork git@github.com:<your-gitgithub-id>/incubator-trafodion |
Code Block | ||||
---|---|---|---|---|
| ||||
# Move to the directory where you want to install the Trafodion source code. cd mysource # Clone the Trafodion source code git clone git://gitgithub.com/apache.org/incubator-trafodion.git # Register your fork as a remote branch cd trafodion git remote add trafdeveloper_fork git@github.com:trafdeveloper/incubator-trafodion |
Create Task Branch
Do the following:
Code Block | ||
---|---|---|
| ||
# Ensure that you have the latest changes git fetch --all # Checkout source git checkout -b TRAFODION-<jira-number> origin/master |
...
Code Block | ||||
---|---|---|---|---|
| ||||
# Ensure that you have the latest changes git fetch --all # Checkout source git checkout -b TRAFODION-1507 origin/master |
Merge Changes
Merge changes from the master branch using the following commands:
Code Block | ||||
---|---|---|---|---|
| ||||
git fetch origin ; git merge origin/master |
Commit Changes
Do the following:
Code Block | ||
---|---|---|
| ||
# Commit changes git commit -a # Dry-run check against main branch git push -n <your-gitgithub-id>_fork HEAD # Push changes to your private fork git push <your-gitgithub-id>_fork TRAFODION-1507 |
Code Block | ||||
---|---|---|---|---|
| ||||
# Commit changes git commit -a # Dry-run check against main branch git push -n trafdeveloper_fork HEAD # Push changes to your private fork git push trafdeveloper_fork TRAFODION-1507 |
Create Pull Request
Do one of the following:
git pull-request
from the git shell.Use the GitHub web interface
.Code Block | ||||
---|---|---|---|---|
| ||||
git pull-request |
to generate pull requests.
Checkout Code
Do the following:
Code Block | ||
---|---|---|
| ||
git checkout TRAFODION-<jira-number> |
...
Code Block | ||||
---|---|---|---|---|
| ||||
git checkout TRAFODION-1507 |
...
Force Core Dump on Specific SQL Error
You can force Trafodion to abort and core dump on a specific error. Use this method:
If you want to catch errors in processes other than sqlci, edit the $MY_SQROOT/etc/ms.env file and add the following line
Code Block ABORT_ON_ERROR=<error-number>
There is only one error number that will take effect, so if you have two lines of ABORT_ON_ERROR, the last one wins.
If you want to catch errors on all nodes of the cluster, copy the edited file to all nodes of the cluster:
Code Block pdsh $MY_NODES $MY_SQROOT/etc/ms.env $MY_SQROOT/etc
If you want to catch errors in the sqlci program, export this environment variable, then run sqlci:
Code Block language bash export ABORT_ON_ERROR=<error-number> sqlci
This will help you to debug when a query run into a SQL error, and it is hard to figure out which code path it runs into. Note that the changes in ms.env will affect all processes on that node and therefore could disrupt operation of your cluster.