- Timestamp:
- 2013-06-10T17:09:36+12:00 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
gs2-extensions/parallel-building/trunk/src/bin/script/hadoop_import.pl
r27584 r27594 8 8 die "GSDLHOME not set\n" unless defined $ENV{'GSDLHOME'}; 9 9 die "GSDLOS not set\n" unless defined $ENV{'GSDLOS'}; 10 die "GEXTPARALLELBUILDING not set\n" unless defined $ENV{'GEXTPARALLELBUILDING'}; 11 die "GEXTPARALLELBUILDING_INSTALLED not set\n" unless defined $ENV{'GEXTPARALLELBUILDING_INSTALLED'}; 10 12 die "HDFS HOST not set (set in <gsdl>/ext/parallel_processing/setup.bash)\n" unless defined $ENV{'HDFSHOST'}; 11 13 die "HDFS PORT not set (set in <gsdl>/ext/parallel_processing/setup.bash)\n" unless defined $ENV{'HDFSPORT'}; … … 17 19 my $collection = 'test'; 18 20 my $use_thrift = 1; 21 my $start_thrift = 1; 19 22 my $debug = 0; 20 23 my $dry_run = 0; … … 38 41 else 39 42 { 40 print STDERR "usage: hadoop_import.pl <collection> [-debug] [-dry_run] [- disable_thrift] [-refresh_import] \n\n";43 print STDERR "usage: hadoop_import.pl <collection> [-debug] [-dry_run] [-start_thrift] [-disable_thrift] [-refresh_import] \n\n"; 41 44 } 42 45 my $offset = 1; … … 207 210 print " configured to use either GDBMServer or TDBServer.\n"; 208 211 exit; 212 } 213 214 # 3.5 Start up the thrift server(s) if we've been asked to 215 if ($start_thrift) 216 { 217 if ($is_rocks_cluster) 218 { 219 print " * Starting Thrift Servers (on compute nodes)... "; 220 &shellCommand('rocks run host "cd ' . $ENV{'GEXTPARALLELBUILDING'} . '/packages/ThriftFS-0.9.0/bin && ./thriftctl.sh start"'); 221 } 222 # single server 223 else 224 { 225 print " * Starting Thrift Server... "; 226 &shellCommand('cd ' . $ENV{'GEXTPARALLELBUILDING'} . '/packages/ThriftFS-0.9.0/bin && thriftctl.sh start'); 227 } 228 print "Done!\n"; 209 229 } 210 230 … … 234 254 } 235 255 256 # 5.5 We started them - so we better stop the thrift servers too 257 # 3.5 Start up the thrift server(s) if we've been asked to 258 if ($start_thrift) 259 { 260 if ($is_rocks_cluster) 261 { 262 print " * Stopping Thrift Servers (on compute nodes)... "; 263 &shellCommand('rocks run host "cd ' . $ENV{'GEXTPARALLELBUILDING'} . '/packages/ThriftFS-0.9.0/bin && ./thriftctl.sh stop"'); 264 } 265 # single server 266 else 267 { 268 print " * Stoping Thrift Server... "; 269 &shellCommand('cd ' . $ENV{'GEXTPARALLELBUILDING'} . '/packages/ThriftFS-0.9.0/bin && thriftctl.sh start'); 270 } 271 print "Done!\n"; 272 } 236 273 237 274 # 6. Gather logs
Note:
See TracChangeset
for help on using the changeset viewer.