Browse Source

MINOR: rename InternalProcessorContext.initialized (#5672)

Reviewers: Bill Bejeck <bill@confluent.io>, Matthias J. Sax <matthias@confluent.io>
pull/5677/merge
John Roesler 6 years ago committed by Matthias J. Sax
parent
commit
96132e2dbb
  1. 2
      streams/src/main/java/org/apache/kafka/streams/processor/internals/AbstractProcessorContext.java
  2. 2
      streams/src/main/java/org/apache/kafka/streams/processor/internals/GlobalStateUpdateTask.java
  3. 2
      streams/src/main/java/org/apache/kafka/streams/processor/internals/InternalProcessorContext.java
  4. 2
      streams/src/main/java/org/apache/kafka/streams/processor/internals/StandbyTask.java
  5. 2
      streams/src/main/java/org/apache/kafka/streams/processor/internals/StreamTask.java
  6. 2
      streams/src/test/java/org/apache/kafka/streams/processor/internals/AbstractProcessorContextTest.java
  7. 2
      streams/src/test/java/org/apache/kafka/test/InternalMockProcessorContext.java
  8. 2
      streams/src/test/java/org/apache/kafka/test/NoOpProcessorContext.java

2
streams/src/main/java/org/apache/kafka/streams/processor/internals/AbstractProcessorContext.java

@ -203,7 +203,7 @@ public abstract class AbstractProcessorContext implements InternalProcessorConte @@ -203,7 +203,7 @@ public abstract class AbstractProcessorContext implements InternalProcessorConte
}
@Override
public void initialized() {
public void initialize() {
initialized = true;
}

2
streams/src/main/java/org/apache/kafka/streams/processor/internals/GlobalStateUpdateTask.java

@ -74,7 +74,7 @@ public class GlobalStateUpdateTask implements GlobalStateMaintainer { @@ -74,7 +74,7 @@ public class GlobalStateUpdateTask implements GlobalStateMaintainer {
);
}
initTopology();
processorContext.initialized();
processorContext.initialize();
return stateMgr.checkpointed();
}

2
streams/src/main/java/org/apache/kafka/streams/processor/internals/InternalProcessorContext.java

@ -57,7 +57,7 @@ public interface InternalProcessorContext extends ProcessorContext { @@ -57,7 +57,7 @@ public interface InternalProcessorContext extends ProcessorContext {
/**
* Mark this context as being initialized
*/
void initialized();
void initialize();
/**
* Mark this context as being uninitialized

2
streams/src/main/java/org/apache/kafka/streams/processor/internals/StandbyTask.java

@ -69,7 +69,7 @@ public class StandbyTask extends AbstractTask { @@ -69,7 +69,7 @@ public class StandbyTask extends AbstractTask {
log.trace("Initializing state stores");
registerStateStores();
checkpointedOffsets = Collections.unmodifiableMap(stateMgr.checkpointed());
processorContext.initialized();
processorContext.initialize();
taskInitialized = true;
return true;
}

2
streams/src/main/java/org/apache/kafka/streams/processor/internals/StreamTask.java

@ -274,7 +274,7 @@ public class StreamTask extends AbstractTask implements ProcessorNodePunctuator @@ -274,7 +274,7 @@ public class StreamTask extends AbstractTask implements ProcessorNodePunctuator
transactionInFlight = true;
}
processorContext.initialized();
processorContext.initialize();
taskInitialized = true;

2
streams/src/test/java/org/apache/kafka/streams/processor/internals/AbstractProcessorContextTest.java

@ -58,7 +58,7 @@ public class AbstractProcessorContextTest { @@ -58,7 +58,7 @@ public class AbstractProcessorContextTest {
@Test
public void shouldThrowIllegalStateExceptionOnRegisterWhenContextIsInitialized() {
context.initialized();
context.initialize();
try {
context.register(stateStore, null);
fail("should throw illegal state exception when context already initialized");

2
streams/src/test/java/org/apache/kafka/test/InternalMockProcessorContext.java

@ -170,7 +170,7 @@ public class InternalMockProcessorContext extends AbstractProcessorContext imple @@ -170,7 +170,7 @@ public class InternalMockProcessorContext extends AbstractProcessorContext imple
// state mgr will be overridden by the state dir and store maps
@Override
public void initialized() {}
public void initialize() {}
public void setStreamTime(final long currentTime) {
streamTime = currentTime;

2
streams/src/test/java/org/apache/kafka/test/NoOpProcessorContext.java

@ -81,7 +81,7 @@ public class NoOpProcessorContext extends AbstractProcessorContext { @@ -81,7 +81,7 @@ public class NoOpProcessorContext extends AbstractProcessorContext {
}
@Override
public void initialized() {
public void initialize() {
initialized = true;
}

Loading…
Cancel
Save