Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added capability for User Defined Sharding #40

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
connect sys/'&1'@oshard-catalog-0:1521/CATCDB as sysdba
alter session set container=CAT1PDB;
alter session enable shard ddl;
create user app_schema identified by app_schema;
create user app_schema identified by '&1';
grant connect, resource, alter session to app_schema;
grant execute on dbms_crypto to app_schema;
grant create table, create procedure, create tablespace, create materialized view to app_schema;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ def main():

# Checking Comand line Args
try:
opts, args = getopt.getopt(sys.argv[1:], '', ['addshard=','deleteshard=','validateshard=','checkliveness=','resetlistener=','restartdb=','createdir=','optype=','addshardgroup=','deployshard=','movechunks=','checkonlineshard=','cancelchunks=','checkchunks=','checkgsmshard=','validatenochunks=','invitednode=','help'])
opts, args = getopt.getopt(sys.argv[1:], '', ['addshard=','deleteshard=','validateshard=','checkliveness=','resetlistener=','restartdb=','createdir=','optype=','addshardgroup=','deployshard=','movechunks=','checkonlineshard=','cancelchunks=','checkchunks=','checkgsmshard=','checkreadyness=','validatenochunks=','invitednode=','resetpassword=','exporttdekey=','importtdekey=','help'])
except getopt.GetoptError:
pass

Expand All @@ -45,7 +45,7 @@ def main():

for opt, arg in opts:
if opt in ('--help'):
oralogger.msg_ = '''{:^17}-{:^17} : You can pass parameter --addshard, --deleteshard, --validateshard, --checkliveness, --resetlistener, --restartdb, --createdir, --optype, --addshardgroup, --deployshard, '--checkonlineshard', '--cancelchunks', '--movechunks', '--checkchunks', '--checkgsmshard','--validatenochunks', '--invitednode', or --help'''
oralogger.msg_ = '''{:^17}-{:^17} : You can pass parameter --addshard, --deleteshard, --validateshard, --checkliveness, --resetlistener, --restartdb, --createdir, --optype, --addshardgroup, --deployshard, '--checkonlineshard', '--cancelchunks', '--movechunks', '--checkchunks', '--checkgsmshard','--validatenochunks', '--checkreadyness','--invitednode', '--resetpassword','--exporttdekey','--importtdekey',or --help'''
stdout_handler.handle(oralogger)
elif opt in ('--addshard'):
file_name = oenv.logfile_name("ADD_SHARD")
Expand All @@ -68,6 +68,12 @@ def main():
oralogger.filename_ = file_name
ocommon.log_info_message("=======================================================================",file_name)
oenv.add_custom_variable("CHECK_LIVENESS",arg)
elif opt in ('--checkreadyness'):
oralogger.stdout_ = None
file_name = oenv.logfile_name("CHECK_READYNESS")
oralogger.filename_ = file_name
ocommon.log_info_message("=======================================================================",file_name)
oenv.add_custom_variable("CHECK_READYNESS",arg)
elif opt in ('--resetlistener'):
file_name = oenv.logfile_name("RESET_LISTENER")
oralogger.filename_ = file_name
Expand All @@ -83,8 +89,6 @@ def main():
oralogger.filename_ = file_name
ocommon.log_info_message("=======================================================================",file_name)
oenv.add_custom_variable("CREATE_DIR",arg)
elif opt in ('--optype'):
oenv.add_custom_variable("OP_TYPE",arg)
elif opt in ('--addshardgroup'):
file_name = oenv.logfile_name("ADD_SGROUP_PARAMS")
oralogger.filename_ = file_name
Expand Down Expand Up @@ -130,6 +134,23 @@ def main():
oralogger.filename_ = file_name
ocommon.log_info_message("=======================================================================",file_name)
oenv.add_custom_variable("INVITED_NODE_OP",arg)
elif opt in ('--resetpassword'):
file_name = oenv.logfile_name("RESET_PASSWD")
oralogger.filename_ = file_name
ocommon.log_info_message("=======================================================================",file_name)
oenv.add_custom_variable("RESET_PASSWORD",arg)
elif opt in ('--exporttdekey'):
file_name = oenv.logfile_name("EXPORT_TDE_KEY")
oralogger.filename_ = file_name
ocommon.log_info_message("=======================================================================",file_name)
oenv.add_custom_variable("EXPORT_TDE_KEY",arg)
elif opt in ('--importtdekey'):
file_name = oenv.logfile_name("IMPORT_TDE_KEY")
oralogger.filename_ = file_name
ocommon.log_info_message("=======================================================================",file_name)
oenv.add_custom_variable("IMPORT_TDE_KEY",arg)
elif opt in ('--optype'):
oenv.add_custom_variable("OP_TYPE",arg)
else:
pass

Expand Down
Loading