From d6f0eeec721abe20c260d8e67800a1f9745875f2 Mon Sep 17 00:00:00 2001 From: Bryan Cutler Date: Tue, 11 Jun 2019 16:58:26 -0700 Subject: [PATCH 1/2] Added '-Dio.netty.tryReflectionSetAccessible=true' property to Java integration test command --- integration/integration_test.py | 32 +++++++++++++++++--------------- 1 file changed, 17 insertions(+), 15 deletions(-) diff --git a/integration/integration_test.py b/integration/integration_test.py index cb0501d843c..f1b66026686 100644 --- a/integration/integration_test.py +++ b/integration/integration_test.py @@ -1307,6 +1307,8 @@ class JavaTester(Tester): FLIGHT_PORT = 31338 + JAVA_OPTS = ['-Dio.netty.tryReflectionSetAccessible=true'] + _arrow_version = load_version_from_pom() ARROW_TOOLS_JAR = os.environ.get( 'ARROW_JAVA_INTEGRATION_JAR', @@ -1326,8 +1328,8 @@ class JavaTester(Tester): name = 'Java' def _run(self, arrow_path=None, json_path=None, command='VALIDATE'): - cmd = ['java', '-cp', self.ARROW_TOOLS_JAR, - 'org.apache.arrow.tools.Integration'] + cmd = ['java'] + self.JAVA_OPTS + ['-cp', self.ARROW_TOOLS_JAR, + 'org.apache.arrow.tools.Integration'] if arrow_path is not None: cmd.extend(['-a', arrow_path]) @@ -1349,35 +1351,35 @@ def json_to_file(self, json_path, arrow_path): return self._run(arrow_path, json_path, 'JSON_TO_ARROW') def stream_to_file(self, stream_path, file_path): - cmd = ['java', '-cp', self.ARROW_TOOLS_JAR, - 'org.apache.arrow.tools.StreamToFile', - stream_path, file_path] + cmd = ['java'] + self.JAVA_OPTS + ['-cp', self.ARROW_TOOLS_JAR, + 'org.apache.arrow.tools.StreamToFile', + stream_path, file_path] if self.debug: print(' '.join(cmd)) run_cmd(cmd) def file_to_stream(self, file_path, stream_path): - cmd = ['java', '-cp', self.ARROW_TOOLS_JAR, - 'org.apache.arrow.tools.FileToStream', - file_path, stream_path] + cmd = ['java'] + self.JAVA_OPTS + ['-cp', self.ARROW_TOOLS_JAR, + 'org.apache.arrow.tools.FileToStream', + file_path, stream_path] if self.debug: print(' '.join(cmd)) run_cmd(cmd) def flight_request(self, port, json_path): - cmd = ['java', '-cp', self.ARROW_FLIGHT_JAR, - self.ARROW_FLIGHT_CLIENT, - '-port', str(port), - '-j', json_path] + cmd = ['java'] + self.JAVA_OPTS + ['-cp', self.ARROW_FLIGHT_JAR, + self.ARROW_FLIGHT_CLIENT, + '-port', str(port), + '-j', json_path] if self.debug: print(' '.join(cmd)) run_cmd(cmd) @contextlib.contextmanager def flight_server(self): - cmd = ['java', '-cp', self.ARROW_FLIGHT_JAR, - self.ARROW_FLIGHT_SERVER, - '-port', str(self.FLIGHT_PORT)] + cmd = ['java'] + self.JAVA_OPTS + ['-cp', self.ARROW_FLIGHT_JAR, + self.ARROW_FLIGHT_SERVER, + '-port', str(self.FLIGHT_PORT)] if self.debug: print(' '.join(cmd)) server = subprocess.Popen(cmd, stdout=subprocess.PIPE) From 25bec06ec7f301d808e13582208f055378024609 Mon Sep 17 00:00:00 2001 From: Bryan Cutler Date: Wed, 12 Jun 2019 09:55:58 -0700 Subject: [PATCH 2/2] fix flake check --- integration/integration_test.py | 29 ++++++++++++++--------------- 1 file changed, 14 insertions(+), 15 deletions(-) diff --git a/integration/integration_test.py b/integration/integration_test.py index f1b66026686..9c6317b46ea 100644 --- a/integration/integration_test.py +++ b/integration/integration_test.py @@ -1328,8 +1328,8 @@ class JavaTester(Tester): name = 'Java' def _run(self, arrow_path=None, json_path=None, command='VALIDATE'): - cmd = ['java'] + self.JAVA_OPTS + ['-cp', self.ARROW_TOOLS_JAR, - 'org.apache.arrow.tools.Integration'] + cmd = ['java'] + self.JAVA_OPTS + \ + ['-cp', self.ARROW_TOOLS_JAR, 'org.apache.arrow.tools.Integration'] if arrow_path is not None: cmd.extend(['-a', arrow_path]) @@ -1351,35 +1351,34 @@ def json_to_file(self, json_path, arrow_path): return self._run(arrow_path, json_path, 'JSON_TO_ARROW') def stream_to_file(self, stream_path, file_path): - cmd = ['java'] + self.JAVA_OPTS + ['-cp', self.ARROW_TOOLS_JAR, - 'org.apache.arrow.tools.StreamToFile', - stream_path, file_path] + cmd = ['java'] + self.JAVA_OPTS + \ + ['-cp', self.ARROW_TOOLS_JAR, + 'org.apache.arrow.tools.StreamToFile', stream_path, file_path] if self.debug: print(' '.join(cmd)) run_cmd(cmd) def file_to_stream(self, file_path, stream_path): - cmd = ['java'] + self.JAVA_OPTS + ['-cp', self.ARROW_TOOLS_JAR, - 'org.apache.arrow.tools.FileToStream', - file_path, stream_path] + cmd = ['java'] + self.JAVA_OPTS + \ + ['-cp', self.ARROW_TOOLS_JAR, + 'org.apache.arrow.tools.FileToStream', file_path, stream_path] if self.debug: print(' '.join(cmd)) run_cmd(cmd) def flight_request(self, port, json_path): - cmd = ['java'] + self.JAVA_OPTS + ['-cp', self.ARROW_FLIGHT_JAR, - self.ARROW_FLIGHT_CLIENT, - '-port', str(port), - '-j', json_path] + cmd = ['java'] + self.JAVA_OPTS + \ + ['-cp', self.ARROW_FLIGHT_JAR, self.ARROW_FLIGHT_CLIENT, + '-port', str(port), '-j', json_path] if self.debug: print(' '.join(cmd)) run_cmd(cmd) @contextlib.contextmanager def flight_server(self): - cmd = ['java'] + self.JAVA_OPTS + ['-cp', self.ARROW_FLIGHT_JAR, - self.ARROW_FLIGHT_SERVER, - '-port', str(self.FLIGHT_PORT)] + cmd = ['java'] + self.JAVA_OPTS + \ + ['-cp', self.ARROW_FLIGHT_JAR, self.ARROW_FLIGHT_SERVER, + '-port', str(self.FLIGHT_PORT)] if self.debug: print(' '.join(cmd)) server = subprocess.Popen(cmd, stdout=subprocess.PIPE)