MCPcopy Create free account
hub / github.com/apache/arrow / root_allocator

Function root_allocator

python/pyarrow/tests/test_jvm.py:33–55  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

31
32@pytest.fixture(scope="session")
33def root_allocator():
34 # This test requires Arrow Java to be built in the same source tree
35 try:
36 arrow_dir = os.environ["ARROW_SOURCE_DIR"]
37 except KeyError:
38 arrow_dir = os.path.join(os.path.dirname(__file__), '..', '..', '..')
39 pom_path = os.path.join(arrow_dir, 'java', 'pom.xml')
40 tree = ET.parse(pom_path)
41 version = tree.getroot().find(
42 'POM:version',
43 namespaces={
44 'POM': 'http://maven.apache.org/POM/4.0.0'
45 }).text
46 jar_path = os.path.join(
47 arrow_dir, 'java', 'tools', 'target',
48 f'arrow-tools-{version}-jar-with-dependencies.jar')
49 jar_path = os.getenv("ARROW_TOOLS_JAR", jar_path)
50 kwargs = {}
51 # This will be the default behaviour in jpype 0.8+
52 kwargs['convertStrings'] = False
53 jpype.startJVM(jpype.getDefaultJVMPath(), "-Djava.class.path=" + jar_path,
54 **kwargs)
55 return jpype.JPackage("org").apache.arrow.memory.RootAllocator(sys.maxsize)
56
57
58def test_jvm_buffer(root_allocator):

Callers

nothing calls this directly

Calls 3

joinMethod · 0.45
parseMethod · 0.45
findMethod · 0.45

Tested by

no test coverage detected