Skip to content

Commit cbb2a44

Browse files
committed
minor code cleanup
1 parent 47bb692 commit cbb2a44

File tree

5 files changed

+8
-19
lines changed

5 files changed

+8
-19
lines changed

marklogic-data-hub/src/main/java/com/marklogic/hub/deploy/commands/DeployHubServersCommand.java

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -66,12 +66,7 @@ protected void deleteResource(final ResourceManager mgr, CommandContext context,
6666
final String payload = getPayload(f, context);
6767
try {
6868
if (isRestartAfterDelete()) {
69-
context.getAdminManager().invokeActionRequiringRestart(new ActionRequiringRestart() {
70-
@Override
71-
public boolean execute() {
72-
return mgr.delete(payload).isDeleted();
73-
}
74-
});
69+
context.getAdminManager().invokeActionRequiringRestart(() -> mgr.delete(payload).isDeleted());
7570
} else {
7671
mgr.delete(payload);
7772
}

marklogic-data-hub/src/main/java/com/marklogic/hub/flow/RunFlowResponse.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
11
package com.marklogic.hub.flow;
22

3-
import javax.xml.bind.annotation.XmlRootElement;
43
import java.util.List;
54

6-
@XmlRootElement(name = "runflowResponse")
75
public class RunFlowResponse {
86
public long totalCount = 0;
97
public long errorCount = 0;

marklogic-data-hub/src/main/java/com/marklogic/hub/flow/impl/FlowRunnerImpl.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,6 @@ public class FlowRunnerImpl implements FlowRunner {
4242
private boolean isFinished = false;
4343
private JobExecution result = null;
4444

45-
4645
public FlowRunnerImpl(HubConfig hubConfig) {
4746
this.hubConfig = hubConfig;
4847
}

marklogic-data-hub/src/test/java/com/marklogic/hub/EndToEndTestSjsJson.java

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -99,14 +99,12 @@ public void runFlows() throws IOException, ParserConfigurationException, SAXExce
9999
}
100100

101101
JsonNode node = jobDocMgr.read("/jobs/" + jobExecution.getJobId() + ".json").next().getContent(new JacksonHandle()).get();
102-
String nodeStr = node.toString();
103-
logger.info(nodeStr);
104-
Assert.assertEquals(nodeStr, Long.toString(jobExecution.getJobId()), node.get("jobId").asText());
105-
Assert.assertEquals(nodeStr, TEST_SIZE, node.get("successfulEvents").asInt());
106-
Assert.assertEquals(nodeStr, 0, node.get("failedEvents").asInt());
107-
Assert.assertEquals(nodeStr, TEST_SIZE / BATCH_SIZE, node.get("successfulBatches").asInt());
108-
Assert.assertEquals(nodeStr, 0, node.get("failedBatches").asInt());
109-
Assert.assertEquals(nodeStr, "FINISHED", node.get("status").asText());
102+
Assert.assertEquals(Long.toString(jobExecution.getJobId()), node.get("jobId").asText());
103+
Assert.assertEquals(TEST_SIZE, node.get("successfulEvents").asInt());
104+
Assert.assertEquals(0, node.get("failedEvents").asInt());
105+
Assert.assertEquals(TEST_SIZE / BATCH_SIZE, node.get("successfulBatches").asInt());
106+
Assert.assertEquals(0, node.get("failedBatches").asInt());
107+
Assert.assertEquals("FINISHED", node.get("status").asText());
110108
}
111109

112110
@Test
@@ -139,7 +137,6 @@ public void runFlowsWithFailures() throws IOException, ParserConfigurationExcept
139137
failed.add(itemId);
140138
});
141139

142-
143140
JobExecution jobExecution = flowRunner.run();
144141

145142
flowRunner.awaitCompletion();

marklogic-data-hub/src/test/java/com/marklogic/hub/EndToEndTestXqyJson.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,12 +166,12 @@ public void runFlowsWithFailures() throws IOException, ParserConfigurationExcept
166166

167167
Vector<String> completed = new Vector<>();
168168
Vector<String> failed = new Vector<>();
169+
169170
flowRunner
170171
.withFlow(harmonizeFlow)
171172
.withBatchSize(BATCH_SIZE)
172173
.withThreadCount(4)
173174
.onItemComplete((String jobId, String itemId) -> {
174-
logger.info(itemId);
175175
completed.add(itemId);
176176
})
177177
.onItemFailed((String jobId, String itemId) -> {

0 commit comments

Comments
 (0)