Skip to content

Commit

Permalink
hive-lineage: minor fixes
Browse files Browse the repository at this point in the history
Signed-off-by: Pahulpreet Singh <[email protected]>
  • Loading branch information
codelixir committed Jan 31, 2025
1 parent 014f3c0 commit ad27856
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 4 deletions.
2 changes: 1 addition & 1 deletion BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,6 @@ py_library(

py_test(
name = "test_hive_lineage",
size = "small",
srcs = ["hive-lineage/test_hive_lineage.py"],
data = [
"hive-lineage/hive-lineage.sh",
Expand All @@ -147,5 +146,6 @@ py_test(
local = True,
deps = [
"//integration_tests:dataproc_test_case",
"@io_abseil_py//absl/testing:parameterized",
],
)
4 changes: 2 additions & 2 deletions hive-lineage/hive-lineage.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash
#
# Copyright 2015 Google LLC and contributors
# Copyright 2025 Google LLC and contributors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -47,7 +47,7 @@ function set_hive_lineage_conf() {

function install_jars() {
echo "Installing openlineage-hive hook"
gsutil cp -P "$INSTALLATION_SOURCE/hive-openlineage-hook-$HIVE_HIVE_OL_HOOK_VERSION.jar" "$HIVE_LIB_DIR/hive-openlineage-hook.jar"
gsutil cp -P "$INSTALLATION_SOURCE/hive-openlineage-hook-$HIVE_OL_HOOK_VERSION.jar" "$HIVE_LIB_DIR/hive-openlineage-hook.jar"
}

function restart_hive_server2_master() {
Expand Down
11 changes: 10 additions & 1 deletion hive-lineage/test_hive_lineage.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
from absl.testing import absltest
from absl.testing import parameterized

from integration_tests.dataproc_test_case import DataprocTestCase

class HiveLineageTestCase(DataprocTestCase):
COMPONENT = "hive-lineage"
INIT_ACTIONS = ["hive-lineage/hive-lineage.sh"]
TEST_SCRIPT_FILE = "hive-lineage/hivetest.hive"

Expand All @@ -13,8 +15,15 @@ def __submit_hive_job(self, cluster_name):
def verify_cluster(self, name):
self.__submit_hive_job(name)

@parameterized.parameters(
'STANDARD',
'HA',
)
def test_hive_job_success(self, configuration):
self.createCluster(configuration, self.INIT_ACTIONS, scopes='cloud-platform')
self.createCluster(configuration,
self.INIT_ACTIONS,
timeout_in_minutes=30,
scopes='cloud-platform')
self.verify_cluster(self.getClusterName())


Expand Down

0 comments on commit ad27856

Please sign in to comment.