mirror of
https://github.com/apache/nifi.git
synced 2025-03-04 00:19:44 +00:00
NIFI-8996: Close JDBC statements in PutHive*QL processors.
Signed-off-by: Matthew Burgess <mattyb149@apache.org> This closes #5280
This commit is contained in:
parent
633cdab121
commit
a239eea8ff
@ -230,7 +230,7 @@ public class PutHiveQL extends AbstractHiveQLProcessor {
|
||||
|
||||
final String hiveQL = hiveQLStr.trim();
|
||||
if (!StringUtils.isEmpty(hiveQL)) {
|
||||
final PreparedStatement stmt = conn.prepareStatement(hiveQL);
|
||||
try (final PreparedStatement stmt = conn.prepareStatement(hiveQL)) {
|
||||
|
||||
// Get ParameterMetadata
|
||||
// Hive JDBC Doesn't support this yet:
|
||||
@ -255,6 +255,7 @@ public class PutHiveQL extends AbstractHiveQLProcessor {
|
||||
fc.proceed();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Emit a Provenance SEND event
|
||||
final long transmissionMillis = TimeUnit.NANOSECONDS.toMillis(System.nanoTime() - fc.startNanos);
|
||||
|
@ -231,7 +231,7 @@ public class PutHive3QL extends AbstractHive3QLProcessor {
|
||||
|
||||
final String hiveQL = hiveQLStr.trim();
|
||||
if (!StringUtils.isEmpty(hiveQL)) {
|
||||
final PreparedStatement stmt = conn.prepareStatement(hiveQL);
|
||||
try (final PreparedStatement stmt = conn.prepareStatement(hiveQL)) {
|
||||
|
||||
// Get ParameterMetadata
|
||||
// Hive JDBC Doesn't support this yet:
|
||||
@ -258,6 +258,7 @@ public class PutHive3QL extends AbstractHive3QLProcessor {
|
||||
fc.proceed();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Emit a Provenance SEND event
|
||||
final long transmissionMillis = TimeUnit.NANOSECONDS.toMillis(System.nanoTime() - fc.startNanos);
|
||||
|
@ -230,7 +230,7 @@ public class PutHive_1_1QL extends AbstractHive_1_1QLProcessor {
|
||||
|
||||
final String hiveQL = hiveQLStr.trim();
|
||||
if (!StringUtils.isEmpty(hiveQL)) {
|
||||
final PreparedStatement stmt = conn.prepareStatement(hiveQL);
|
||||
try (final PreparedStatement stmt = conn.prepareStatement(hiveQL)) {
|
||||
|
||||
// Get ParameterMetadata
|
||||
// Hive JDBC Doesn't support this yet:
|
||||
@ -255,6 +255,7 @@ public class PutHive_1_1QL extends AbstractHive_1_1QLProcessor {
|
||||
fc.proceed();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Emit a Provenance SEND event
|
||||
final long transmissionMillis = TimeUnit.NANOSECONDS.toMillis(System.nanoTime() - fc.startNanos);
|
||||
|
Loading…
x
Reference in New Issue
Block a user