Code Review
/
dmaap
/
datarouter.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
DR AAF CADI integration
[dmaap/datarouter.git]
/
datarouter-prov
/
src
/
main
/
java
/
org
/
onap
/
dmaap
/
datarouter
/
provisioning
/
utils
/
LogfileLoader.java
diff --git
a/datarouter-prov/src/main/java/org/onap/dmaap/datarouter/provisioning/utils/LogfileLoader.java
b/datarouter-prov/src/main/java/org/onap/dmaap/datarouter/provisioning/utils/LogfileLoader.java
index
ab1a3a7
..
6c5a13f
100644
(file)
--- a/
datarouter-prov/src/main/java/org/onap/dmaap/datarouter/provisioning/utils/LogfileLoader.java
+++ b/
datarouter-prov/src/main/java/org/onap/dmaap/datarouter/provisioning/utils/LogfileLoader.java
@@
-82,7
+82,7
@@
public class LogfileLoader extends Thread {
/**
\r
* This is a singleton -- there is only one LogfileLoader object in the server
\r
*/
\r
/**
\r
* This is a singleton -- there is only one LogfileLoader object in the server
\r
*/
\r
- private static LogfileLoader
p
;
\r
+ private static LogfileLoader
logfileLoader
;
\r
\r
/**
\r
* Get the singleton LogfileLoader object, and start it if it is not running.
\r
\r
/**
\r
* Get the singleton LogfileLoader object, and start it if it is not running.
\r
@@
-90,11
+90,11
@@
public class LogfileLoader extends Thread {
* @return the LogfileLoader
\r
*/
\r
public static synchronized LogfileLoader getLoader() {
\r
* @return the LogfileLoader
\r
*/
\r
public static synchronized LogfileLoader getLoader() {
\r
- if (
p
== null)
\r
-
p
= new LogfileLoader();
\r
- if (!
p
.isAlive())
\r
-
p
.start();
\r
- return
p
;
\r
+ if (
logfileLoader
== null)
\r
+
logfileLoader
= new LogfileLoader();
\r
+ if (!
logfileLoader
.isAlive())
\r
+
logfileLoader
.start();
\r
+ return
logfileLoader
;
\r
}
\r
\r
/**
\r
}
\r
\r
/**
\r
@@
-218,7
+218,7
@@
public class LogfileLoader extends Thread {
}
\r
}
\r
\r
}
\r
}
\r
\r
-
private
boolean pruneRecords() {
\r
+ boolean pruneRecords() {
\r
boolean did1 = false;
\r
long count = countRecords();
\r
long threshold = DEFAULT_LOG_RETENTION;
\r
boolean did1 = false;
\r
long count = countRecords();
\r
long threshold = DEFAULT_LOG_RETENTION;
\r
@@
-282,7
+282,7
@@
public class LogfileLoader extends Thread {
return did1;
\r
}
\r
\r
return did1;
\r
}
\r
\r
-
private
long countRecords() {
\r
+ long countRecords() {
\r
long count = 0;
\r
Connection conn = null;
\r
try {
\r
long count = 0;
\r
Connection conn = null;
\r
try {
\r
@@
-303,7
+303,7
@@
public class LogfileLoader extends Thread {
return count;
\r
}
\r
\r
return count;
\r
}
\r
\r
-
private
Map<Long, Long> getHistogram() {
\r
+ Map<Long, Long> getHistogram() {
\r
Map<Long, Long> map = new HashMap<Long, Long>();
\r
Connection conn = null;
\r
try {
\r
Map<Long, Long> map = new HashMap<Long, Long>();
\r
Connection conn = null;
\r
try {
\r
@@
-382,7
+382,7
@@
public class LogfileLoader extends Thread {
}
\r
\r
@SuppressWarnings("resource")
\r
}
\r
\r
@SuppressWarnings("resource")
\r
-
private
int[] process(File f) {
\r
+ int[] process(File f) {
\r
int ok = 0, total = 0;
\r
try {
\r
Connection conn = db.getConnection();
\r
int ok = 0, total = 0;
\r
try {
\r
Connection conn = db.getConnection();
\r
@@
-442,7
+442,7
@@
public class LogfileLoader extends Thread {
return new int[]{ok, total};
\r
}
\r
\r
return new int[]{ok, total};
\r
}
\r
\r
-
private
Loadable[] buildRecords(String line) throws ParseException {
\r
+ Loadable[] buildRecords(String line) throws ParseException {
\r
String[] pp = line.split("\\|");
\r
if (pp != null && pp.length >= 7) {
\r
String rtype = pp[1].toUpperCase();
\r
String[] pp = line.split("\\|");
\r
if (pp != null && pp.length >= 7) {
\r
String rtype = pp[1].toUpperCase();
\r