Changeset 27532 for gs2-extensions
- Timestamp:
- 2013-06-04T11:12:36+12:00 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
gs2-extensions/parallel-building/trunk/src/perllib/FileUtils/HDThriftFS.pm
r27525 r27532 45 45 die "GEXTPARALLELBUILDING not set\n" unless defined $ENV{'GEXTPARALLELBUILDING'}; 46 46 die "GSDLOS not set\n" unless defined $ENV{'GSDLOS'}; 47 die "GSDLCOLLECTDIR not set\n" unless defined $ENV{'GSDLCOLLECTDIR'}; 47 48 # We need the Perl version before continuing 48 49 if (!defined $ENV{'PERL_VERSION'}) … … 72 73 73 74 # Configuration 74 my $host = " medusa.local";75 my $host = "localhost"; 75 76 my $port = 58660; 76 77 my $debug = 0; 77 78 my $debug_encoding = 0; 79 # Testing shows 64k is pretty optimal 78 80 #my $buffer_length = 4 * 1024; # 4k blocks 79 81 #my $buffer_length = 8 * 1024; # 8k blocks … … 115 117 if (!defined $thrift_client) 116 118 { 117 ###rint "Create Thrift Client to $host:$port\n"; 119 # Look for a configuration file to override the default localhost:58660 120 # settings 121 my $conf_file_path = &FileUtils::filenameConcatenate($ENV{'GSDLCOLLECTDIR'}, 'etc', 'thrift.conf'); 122 if (&FileUtils::fileExists($conf_file_path)) 123 { 124 print "Found Thrift configuration file:\n"; 125 my $conf_raw = &FileUtils::fileGetContents($conf_file_path); 126 if ($conf_raw =~ /^([^:]+):(\d+)/) 127 { 128 $host = $1; 129 print " - Host: " . $host . "\n"; 130 $port = $2; 131 print " - Port: " . $port . "\n"; 132 } 133 } 134 135 print "Establish Thrift client connecting to: $host:$port\n"; 118 136 my $socket = Thrift::Socket->new($host, $port); 119 137 $socket->setSendTimeout(10000);
Note:
See TracChangeset
for help on using the changeset viewer.