Skip to content

Commit 9be1447

Browse files
committed
all log levels to info
1 parent 975ca10 commit 9be1447

File tree

3 files changed

+20
-9
lines changed

3 files changed

+20
-9
lines changed

integration/spark/app/src/main/java/io/openlineage/spark/agent/NuEventEmitter.java

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -35,15 +35,15 @@ public class NuEventEmitter {
3535
private static Boolean isPermittedJobType(RunEvent event) {
3636
String jobType = event.getJob().getFacets().getJobType().getJobType();
3737
if (WANTED_JOB_TYPES.stream().noneMatch(jobType::equals)) {
38-
log.debug("OpenLineage event with job type {} has no lineage value and should not be emitted", jobType);
38+
log.info("OpenLineage event with job type {} has no lineage value and should not be emitted", jobType);
3939
return false;
4040
}
4141
return true;
4242
}
4343

4444
private static Boolean isPermitedEventType(RunEvent event) {
4545
if (RUNNING.equals(event.getEventType())) {
46-
log.debug("OpenLineage event is {} and should not be emitted", RUNNING);
46+
log.info("OpenLineage event is {} and should not be emitted", RUNNING);
4747
return false;
4848
}
4949
return true;
@@ -52,11 +52,11 @@ private static Boolean isPermitedEventType(RunEvent event) {
5252
private static Boolean isPermittedJobName(RunEvent event) {
5353
String jobName = event.getJob().getName();
5454
if (isNull(jobName)) {
55-
log.debug("OpenLineage event has no job name and should not be emitted");
55+
log.info("OpenLineage event has no job name and should not be emitted");
5656
return false;
5757
}
5858
if (WANTED_EVENT_NAME_SUBSTRINGS.stream().noneMatch(jobName::contains)) {
59-
log.debug("OpenLineage event job name {} has no permitted substring and should not be emitted", jobName);
59+
log.info("OpenLineage event job name {} has no permitted substring and should not be emitted", jobName);
6060
return false;
6161
}
6262
return true;
@@ -83,15 +83,15 @@ private static void discardColumnLineageFacet(RunEvent event) {
8383
.collect(Collectors.toList())
8484
.forEach(dataset -> {
8585
try {
86-
log.debug("Discarding column lineage facet for dataset {} {} {}",
86+
log.info("Discarding column lineage facet for dataset {} {} {}",
8787
dataset.getClass().getSimpleName(), dataset.getNamespace(), dataset.getName());
8888
columnLineageFacetField.set(dataset.getFacets(), null);
8989
} catch (IllegalAccessException e) {
90-
log.error("Failed to discard column lineage facet", e);
90+
log.info("Failed to discard column lineage facet", e);
9191
}
9292
});
9393
} catch (NoSuchFieldException e) {
94-
log.error("Failed to discard column lineage facet: columnLineage field not found at OpenLineage.DatasetFacets", e);
94+
log.info("Failed to discard column lineage facet: columnLineage field not found at OpenLineage.DatasetFacets", e);
9595
}
9696
}
9797

integration/spark/shared/src/main/java/io/openlineage/spark/agent/facets/NuFacet.java

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,25 +37,34 @@ public class NuFacet extends OpenLineage.DefaultRunFacet {
3737
private Map<String, String> resolvedInputs;
3838

3939
private String getJobNurn(SparkSession sparkSession) {
40+
log.info("Getting jobNurn");
4041
return getConfigValue("spark.job.name", sparkSession);
4142
}
4243

4344
private Map<String, String> getResolvedInputs(SparkSession sparkSession) {
45+
log.info("Getting resolvedInputs");
4446
String resolvedInputsJson = getConfigValue("spark.job.resolvedInputsMap", sparkSession);
4547
try {
4648
return parseJsonToMap(resolvedInputsJson);
4749
} catch (JsonProcessingException e) {
48-
log.warn("Error parsing resolvedInputsJson JSON", e);
50+
log.info("Error parsing resolvedInputsJson JSON", e);
4951
return null;
5052
}
5153
}
5254

5355
public NuFacet(@NonNull OpenLineageContext olContext) {
5456
super(Versions.OPEN_LINEAGE_PRODUCER_URI);
57+
log.info("Creating NuFacet");
5558
if (olContext.getSparkSession().isPresent()) {
59+
log.info("SparkSession found in OpenLineageContext");
5660
SparkSession sparkSession = olContext.getSparkSession().get();
5761
this.jobNurn = getJobNurn(sparkSession);
62+
log.info("jobNurn: {}", this.jobNurn);
63+
5864
this.resolvedInputs = getResolvedInputs(sparkSession);
65+
log.info("resolvedInputs: {}", this.resolvedInputs);
66+
} else {
67+
log.info("SparkSession not found in OpenLineageContext");
5968
}
6069
}
6170
}

integration/spark/shared/src/main/java/io/openlineage/spark/agent/util/NuFacetsUtils.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,9 @@
1414
@Slf4j
1515
public class NuFacetsUtils {
1616
public static Map<String, String> parseJsonToMap(String jsonString) throws JsonProcessingException {
17+
log.info("Parsing JSON to Map: {}", jsonString);
1718
if (Objects.isNull(jsonString)) {
19+
log.info("JSON string is null");
1820
return null;
1921
}
2022
ObjectMapper mapper = new ObjectMapper();
@@ -26,7 +28,7 @@ public static String getConfigValue(String key, SparkSession sparkSession) {
2628
try {
2729
return sparkSession.conf().get(key);
2830
} catch (NoSuchElementException e) {
29-
log.warn("Property {} not found in the context", key);
31+
log.info("Property {} not found in the context", key);
3032
return null;
3133
}
3234
}

0 commit comments

Comments
 (0)