Skip to content

Commit

Permalink
Improve DEBUG level logs; unify BUILD dependencies format (#64)
Browse files Browse the repository at this point in the history
  • Loading branch information
frsv authored Nov 27, 2023
1 parent c1b905c commit 2351338
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ java_library(
"//src/java/com/google/cloud/bigquery/dwhassessment/hooks/logger",
"//src/java/com/google/cloud/bigquery/dwhassessment/hooks/logger/exception",
"//src/java/com/google/cloud/bigquery/dwhassessment/hooks/logger/utils",
"@maven//:org_apache_hadoop_hadoop_mapred_0_22_0",
"@maven//:org_apache_hadoop_hadoop_mapred",
"@maven//:org_apache_hive_hive_exec",
"@maven//:org_slf4j_slf4j_api",
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ java_library(
"@maven//:org_apache_hadoop_hadoop_yarn_api",
"@maven//:org_apache_hadoop_hadoop_yarn_client",
"@maven//:org_apache_hive_hive_exec",
"@maven//:org_apache_tez_tez_api_0_8_5",
"@maven//:org_apache_tez_tez_api",
"@maven//:org_slf4j_slf4j_api",
],
)
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ public void handle(HookContext hookContext) {
// before we start the pre hook processing and causes inconsistent events publishing.
QueryPlan plan = hookContext.getQueryPlan();
if (plan == null) {
LOG.debug("Received null query plan.");
LOG.debug("Received null query plan, skipping query event.");
return;
}

Expand All @@ -147,7 +147,7 @@ public void handle(HookContext hookContext) {
}

private void tryWriteEvent(GenericRecord event, HookType hookType) {
LOG.debug("Trying to handle an event '{}' for query '{}'", hookType, event.get("QueryId"));
LOG.debug("Trying to handle an event '{}' for record '{}'", hookType, event);
try {
// ScheduledThreadPoolExecutor uses an unbounded queue which cannot be replaced with a
// bounded queue.
Expand All @@ -156,10 +156,13 @@ private void tryWriteEvent(GenericRecord event, HookType hookType) {
logWriter.execute(() -> writeEventWithRetries(event));
} else {
LOG.warn(
"Writer queue full. Ignoring event '{}' for query '{}'", hookType, event.get("QueryId"));
"Writer queue full. Ignoring event '{}' for query '{}'",
hookType,
event.get("QueryId"));
}
} catch (RejectedExecutionException e) {
LOG.warn("Writer queue full. Ignoring event '{}' for query '{}'", hookType, event.get("QueryId"));
LOG.warn(
"Writer queue full. Ignoring event '{}' for query '{}'", hookType, event.get("QueryId"));
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,14 @@ package(default_visibility = ["//src:internal"])

java_library(
name = "testing",
srcs = glob(["*.java"]),
testonly = 1,
srcs = glob(["*.java"]),
deps = [
"//src/java/com/google/cloud/bigquery/dwhassessment/hooks/logger",
"@maven_tests//:org_apache_avro_avro",
"@maven_tests//:org_apache_hadoop_hadoop_common",
"@maven_tests//:org_apache_hive_hive_exec_2_2_0",
"@maven_tests//:com_google_guava_guava",
"@maven_tests//:com_google_truth_truth",
"@maven_tests//:org_apache_avro_avro",
"@maven_tests//:org_apache_hadoop_hadoop_common",
"@maven_tests//:org_apache_hive_hive_exec",
],
)
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,8 @@ java_library(
"@maven_tests//:org_apache_hadoop_hadoop_yarn_common",
"@maven_tests//:org_apache_hive_hive_common",
"@maven_tests//:org_apache_hive_hive_exec",
"@maven_tests//:org_apache_tez_tez_api_0_8_5",
"@maven_tests//:org_apache_tez_tez_dag_0_8_5",
"@maven_tests//:org_apache_tez_tez_api",
"@maven_tests//:org_apache_tez_tez_dag",
"@maven_tests//:org_mockito_mockito_core",
"@maven_tests//:org_slf4j_slf4j_api",
],
Expand Down

0 comments on commit 2351338

Please sign in to comment.