target
stringlengths
20
113k
src_fm
stringlengths
11
86.3k
src_fm_fc
stringlengths
21
86.4k
src_fm_fc_co
stringlengths
30
86.4k
src_fm_fc_ms
stringlengths
42
86.8k
src_fm_fc_ms_ff
stringlengths
43
86.8k
@Test public void testDeleteJarById() throws Exception { assertThat(Files.exists(jarDir.resolve(TEST_JAR_NAME)), equalTo(true)); final HandlerRequest<EmptyRequestBody, JarDeleteMessageParameters> request = createRequest(TEST_JAR_NAME); jarDeleteHandler.handleRequest(request, restfulGateway).get(); assertThat(Files.exis...
@Override protected CompletableFuture<EmptyResponseBody> handleRequest( @Nonnull final HandlerRequest<EmptyRequestBody, JarDeleteMessageParameters> request, @Nonnull final RestfulGateway gateway) throws RestHandlerException { final String jarId = request.getPathParameter(JarIdPathParameter.class); return CompletableFut...
JarDeleteHandler extends AbstractRestHandler<RestfulGateway, EmptyRequestBody, EmptyResponseBody, JarDeleteMessageParameters> { @Override protected CompletableFuture<EmptyResponseBody> handleRequest( @Nonnull final HandlerRequest<EmptyRequestBody, JarDeleteMessageParameters> request, @Nonnull final RestfulGateway gatew...
JarDeleteHandler extends AbstractRestHandler<RestfulGateway, EmptyRequestBody, EmptyResponseBody, JarDeleteMessageParameters> { @Override protected CompletableFuture<EmptyResponseBody> handleRequest( @Nonnull final HandlerRequest<EmptyRequestBody, JarDeleteMessageParameters> request, @Nonnull final RestfulGateway gatew...
JarDeleteHandler extends AbstractRestHandler<RestfulGateway, EmptyRequestBody, EmptyResponseBody, JarDeleteMessageParameters> { @Override protected CompletableFuture<EmptyResponseBody> handleRequest( @Nonnull final HandlerRequest<EmptyRequestBody, JarDeleteMessageParameters> request, @Nonnull final RestfulGateway gatew...
JarDeleteHandler extends AbstractRestHandler<RestfulGateway, EmptyRequestBody, EmptyResponseBody, JarDeleteMessageParameters> { @Override protected CompletableFuture<EmptyResponseBody> handleRequest( @Nonnull final HandlerRequest<EmptyRequestBody, JarDeleteMessageParameters> request, @Nonnull final RestfulGateway gatew...
@Test public void testEquals() throws Exception { ResourceSpec rs1 = ResourceSpec.newBuilder().setCpuCores(1.0).setHeapMemoryInMB(100).build(); ResourceSpec rs2 = ResourceSpec.newBuilder().setCpuCores(1.0).setHeapMemoryInMB(100).build(); assertTrue(rs1.equals(rs2)); assertTrue(rs2.equals(rs1)); ResourceSpec rs3 = Resou...
@Override public boolean equals(Object obj) { if (obj == this) { return true; } else if (obj != null && obj.getClass() == ResourceSpec.class) { ResourceSpec that = (ResourceSpec) obj; return this.cpuCores == that.cpuCores && this.heapMemoryInMB == that.heapMemoryInMB && this.directMemoryInMB == that.directMemoryInMB &&...
ResourceSpec implements Serializable { @Override public boolean equals(Object obj) { if (obj == this) { return true; } else if (obj != null && obj.getClass() == ResourceSpec.class) { ResourceSpec that = (ResourceSpec) obj; return this.cpuCores == that.cpuCores && this.heapMemoryInMB == that.heapMemoryInMB && this.direc...
ResourceSpec implements Serializable { @Override public boolean equals(Object obj) { if (obj == this) { return true; } else if (obj != null && obj.getClass() == ResourceSpec.class) { ResourceSpec that = (ResourceSpec) obj; return this.cpuCores == that.cpuCores && this.heapMemoryInMB == that.heapMemoryInMB && this.direc...
ResourceSpec implements Serializable { @Override public boolean equals(Object obj) { if (obj == this) { return true; } else if (obj != null && obj.getClass() == ResourceSpec.class) { ResourceSpec that = (ResourceSpec) obj; return this.cpuCores == that.cpuCores && this.heapMemoryInMB == that.heapMemoryInMB && this.direc...
ResourceSpec implements Serializable { @Override public boolean equals(Object obj) { if (obj == this) { return true; } else if (obj != null && obj.getClass() == ResourceSpec.class) { ResourceSpec that = (ResourceSpec) obj; return this.cpuCores == that.cpuCores && this.heapMemoryInMB == that.heapMemoryInMB && this.direc...
@Test public void testHashCode() throws Exception { ResourceSpec rs1 = ResourceSpec.newBuilder().setCpuCores(1.0).setHeapMemoryInMB(100).build(); ResourceSpec rs2 = ResourceSpec.newBuilder().setCpuCores(1.0).setHeapMemoryInMB(100).build(); assertEquals(rs1.hashCode(), rs2.hashCode()); ResourceSpec rs3 = ResourceSpec.ne...
@Override public int hashCode() { final long cpuBits = Double.doubleToLongBits(cpuCores); int result = (int) (cpuBits ^ (cpuBits >>> 32)); result = 31 * result + heapMemoryInMB; result = 31 * result + directMemoryInMB; result = 31 * result + nativeMemoryInMB; result = 31 * result + stateSizeInMB; result = 31 * result +...
ResourceSpec implements Serializable { @Override public int hashCode() { final long cpuBits = Double.doubleToLongBits(cpuCores); int result = (int) (cpuBits ^ (cpuBits >>> 32)); result = 31 * result + heapMemoryInMB; result = 31 * result + directMemoryInMB; result = 31 * result + nativeMemoryInMB; result = 31 * result ...
ResourceSpec implements Serializable { @Override public int hashCode() { final long cpuBits = Double.doubleToLongBits(cpuCores); int result = (int) (cpuBits ^ (cpuBits >>> 32)); result = 31 * result + heapMemoryInMB; result = 31 * result + directMemoryInMB; result = 31 * result + nativeMemoryInMB; result = 31 * result ...
ResourceSpec implements Serializable { @Override public int hashCode() { final long cpuBits = Double.doubleToLongBits(cpuCores); int result = (int) (cpuBits ^ (cpuBits >>> 32)); result = 31 * result + heapMemoryInMB; result = 31 * result + directMemoryInMB; result = 31 * result + nativeMemoryInMB; result = 31 * result ...
ResourceSpec implements Serializable { @Override public int hashCode() { final long cpuBits = Double.doubleToLongBits(cpuCores); int result = (int) (cpuBits ^ (cpuBits >>> 32)); result = 31 * result + heapMemoryInMB; result = 31 * result + directMemoryInMB; result = 31 * result + nativeMemoryInMB; result = 31 * result ...
@Test public void testMerge() throws Exception { ResourceSpec rs1 = ResourceSpec.newBuilder(). setCpuCores(1.0). setHeapMemoryInMB(100). setGPUResource(1.1). build(); ResourceSpec rs2 = ResourceSpec.newBuilder().setCpuCores(1.0).setHeapMemoryInMB(100).build(); ResourceSpec rs3 = rs1.merge(rs2); assertEquals(1.1, rs3.ge...
public ResourceSpec merge(ResourceSpec other) { ResourceSpec target = new ResourceSpec( Math.max(this.cpuCores, other.cpuCores), this.heapMemoryInMB + other.heapMemoryInMB, this.directMemoryInMB + other.directMemoryInMB, this.nativeMemoryInMB + other.nativeMemoryInMB, this.stateSizeInMB + other.stateSizeInMB); target.e...
ResourceSpec implements Serializable { public ResourceSpec merge(ResourceSpec other) { ResourceSpec target = new ResourceSpec( Math.max(this.cpuCores, other.cpuCores), this.heapMemoryInMB + other.heapMemoryInMB, this.directMemoryInMB + other.directMemoryInMB, this.nativeMemoryInMB + other.nativeMemoryInMB, this.stateSi...
ResourceSpec implements Serializable { public ResourceSpec merge(ResourceSpec other) { ResourceSpec target = new ResourceSpec( Math.max(this.cpuCores, other.cpuCores), this.heapMemoryInMB + other.heapMemoryInMB, this.directMemoryInMB + other.directMemoryInMB, this.nativeMemoryInMB + other.nativeMemoryInMB, this.stateSi...
ResourceSpec implements Serializable { public ResourceSpec merge(ResourceSpec other) { ResourceSpec target = new ResourceSpec( Math.max(this.cpuCores, other.cpuCores), this.heapMemoryInMB + other.heapMemoryInMB, this.directMemoryInMB + other.directMemoryInMB, this.nativeMemoryInMB + other.nativeMemoryInMB, this.stateSi...
ResourceSpec implements Serializable { public ResourceSpec merge(ResourceSpec other) { ResourceSpec target = new ResourceSpec( Math.max(this.cpuCores, other.cpuCores), this.heapMemoryInMB + other.heapMemoryInMB, this.directMemoryInMB + other.directMemoryInMB, this.nativeMemoryInMB + other.nativeMemoryInMB, this.stateSi...
@Test public void testSerializable() throws Exception { ResourceSpec rs1 = ResourceSpec.newBuilder(). setCpuCores(1.0). setHeapMemoryInMB(100). setGPUResource(1.1). build(); byte[] buffer = InstantiationUtil.serializeObject(rs1); ResourceSpec rs2 = InstantiationUtil.deserializeObject(buffer, ClassLoader.getSystemClassL...
public static Builder newBuilder() { return new Builder(); }
ResourceSpec implements Serializable { public static Builder newBuilder() { return new Builder(); } }
ResourceSpec implements Serializable { public static Builder newBuilder() { return new Builder(); } protected ResourceSpec( double cpuCores, int heapMemoryInMB, int directMemoryInMB, int nativeMemoryInMB, int stateSizeInMB, Resource... extendedResources); }
ResourceSpec implements Serializable { public static Builder newBuilder() { return new Builder(); } protected ResourceSpec( double cpuCores, int heapMemoryInMB, int directMemoryInMB, int nativeMemoryInMB, int stateSizeInMB, Resource... extendedResources); ResourceSpec merge(ResourceSpec other); doubl...
ResourceSpec implements Serializable { public static Builder newBuilder() { return new Builder(); } protected ResourceSpec( double cpuCores, int heapMemoryInMB, int directMemoryInMB, int nativeMemoryInMB, int stateSizeInMB, Resource... extendedResources); ResourceSpec merge(ResourceSpec other); doubl...
@Test public void testDeleteUnknownJar() throws Exception { final HandlerRequest<EmptyRequestBody, JarDeleteMessageParameters> request = createRequest("doesnotexist.jar"); try { jarDeleteHandler.handleRequest(request, restfulGateway).get(); } catch (final ExecutionException e) { final Throwable throwable = ExceptionUti...
@Override protected CompletableFuture<EmptyResponseBody> handleRequest( @Nonnull final HandlerRequest<EmptyRequestBody, JarDeleteMessageParameters> request, @Nonnull final RestfulGateway gateway) throws RestHandlerException { final String jarId = request.getPathParameter(JarIdPathParameter.class); return CompletableFut...
JarDeleteHandler extends AbstractRestHandler<RestfulGateway, EmptyRequestBody, EmptyResponseBody, JarDeleteMessageParameters> { @Override protected CompletableFuture<EmptyResponseBody> handleRequest( @Nonnull final HandlerRequest<EmptyRequestBody, JarDeleteMessageParameters> request, @Nonnull final RestfulGateway gatew...
JarDeleteHandler extends AbstractRestHandler<RestfulGateway, EmptyRequestBody, EmptyResponseBody, JarDeleteMessageParameters> { @Override protected CompletableFuture<EmptyResponseBody> handleRequest( @Nonnull final HandlerRequest<EmptyRequestBody, JarDeleteMessageParameters> request, @Nonnull final RestfulGateway gatew...
JarDeleteHandler extends AbstractRestHandler<RestfulGateway, EmptyRequestBody, EmptyResponseBody, JarDeleteMessageParameters> { @Override protected CompletableFuture<EmptyResponseBody> handleRequest( @Nonnull final HandlerRequest<EmptyRequestBody, JarDeleteMessageParameters> request, @Nonnull final RestfulGateway gatew...
JarDeleteHandler extends AbstractRestHandler<RestfulGateway, EmptyRequestBody, EmptyResponseBody, JarDeleteMessageParameters> { @Override protected CompletableFuture<EmptyResponseBody> handleRequest( @Nonnull final HandlerRequest<EmptyRequestBody, JarDeleteMessageParameters> request, @Nonnull final RestfulGateway gatew...
@Test public void testFailedDelete() throws Exception { makeJarDirReadOnly(); final HandlerRequest<EmptyRequestBody, JarDeleteMessageParameters> request = createRequest(TEST_JAR_NAME); try { jarDeleteHandler.handleRequest(request, restfulGateway).get(); } catch (final ExecutionException e) { final Throwable throwable =...
@Override protected CompletableFuture<EmptyResponseBody> handleRequest( @Nonnull final HandlerRequest<EmptyRequestBody, JarDeleteMessageParameters> request, @Nonnull final RestfulGateway gateway) throws RestHandlerException { final String jarId = request.getPathParameter(JarIdPathParameter.class); return CompletableFut...
JarDeleteHandler extends AbstractRestHandler<RestfulGateway, EmptyRequestBody, EmptyResponseBody, JarDeleteMessageParameters> { @Override protected CompletableFuture<EmptyResponseBody> handleRequest( @Nonnull final HandlerRequest<EmptyRequestBody, JarDeleteMessageParameters> request, @Nonnull final RestfulGateway gatew...
JarDeleteHandler extends AbstractRestHandler<RestfulGateway, EmptyRequestBody, EmptyResponseBody, JarDeleteMessageParameters> { @Override protected CompletableFuture<EmptyResponseBody> handleRequest( @Nonnull final HandlerRequest<EmptyRequestBody, JarDeleteMessageParameters> request, @Nonnull final RestfulGateway gatew...
JarDeleteHandler extends AbstractRestHandler<RestfulGateway, EmptyRequestBody, EmptyResponseBody, JarDeleteMessageParameters> { @Override protected CompletableFuture<EmptyResponseBody> handleRequest( @Nonnull final HandlerRequest<EmptyRequestBody, JarDeleteMessageParameters> request, @Nonnull final RestfulGateway gatew...
JarDeleteHandler extends AbstractRestHandler<RestfulGateway, EmptyRequestBody, EmptyResponseBody, JarDeleteMessageParameters> { @Override protected CompletableFuture<EmptyResponseBody> handleRequest( @Nonnull final HandlerRequest<EmptyRequestBody, JarDeleteMessageParameters> request, @Nonnull final RestfulGateway gatew...
@Test public void testConvertStringToValue() { assertEquals("42", parallelismQueryParameter.convertValueToString(42)); }
@Override public Integer convertStringToValue(final String value) { return Integer.valueOf(value); }
ParallelismQueryParameter extends MessageQueryParameter<Integer> { @Override public Integer convertStringToValue(final String value) { return Integer.valueOf(value); } }
ParallelismQueryParameter extends MessageQueryParameter<Integer> { @Override public Integer convertStringToValue(final String value) { return Integer.valueOf(value); } ParallelismQueryParameter(); }
ParallelismQueryParameter extends MessageQueryParameter<Integer> { @Override public Integer convertStringToValue(final String value) { return Integer.valueOf(value); } ParallelismQueryParameter(); @Override Integer convertStringToValue(final String value); @Override String convertValueToString(final Integer value); }
ParallelismQueryParameter extends MessageQueryParameter<Integer> { @Override public Integer convertStringToValue(final String value) { return Integer.valueOf(value); } ParallelismQueryParameter(); @Override Integer convertStringToValue(final String value); @Override String convertValueToString(final Integer value); }
@Test public void testConvertValueFromString() { assertEquals(42, (int) parallelismQueryParameter.convertStringToValue("42")); }
@Override public Integer convertStringToValue(final String value) { return Integer.valueOf(value); }
ParallelismQueryParameter extends MessageQueryParameter<Integer> { @Override public Integer convertStringToValue(final String value) { return Integer.valueOf(value); } }
ParallelismQueryParameter extends MessageQueryParameter<Integer> { @Override public Integer convertStringToValue(final String value) { return Integer.valueOf(value); } ParallelismQueryParameter(); }
ParallelismQueryParameter extends MessageQueryParameter<Integer> { @Override public Integer convertStringToValue(final String value) { return Integer.valueOf(value); } ParallelismQueryParameter(); @Override Integer convertStringToValue(final String value); @Override String convertValueToString(final Integer value); }
ParallelismQueryParameter extends MessageQueryParameter<Integer> { @Override public Integer convertStringToValue(final String value) { return Integer.valueOf(value); } ParallelismQueryParameter(); @Override Integer convertStringToValue(final String value); @Override String convertValueToString(final Integer value); }
@Test public void testTokenizeNonQuoted() { final List<String> arguments = JarHandlerUtils.tokenizeArguments("--foo bar"); assertThat(arguments.get(0), equalTo("--foo")); assertThat(arguments.get(1), equalTo("bar")); }
public static List<String> tokenizeArguments(@Nullable final String args) { if (args == null) { return Collections.emptyList(); } final Matcher matcher = ARGUMENTS_TOKENIZE_PATTERN.matcher(args); final List<String> tokens = new ArrayList<>(); while (matcher.find()) { tokens.add(matcher.group() .trim() .replace("\"", ""...
JarHandlerUtils { public static List<String> tokenizeArguments(@Nullable final String args) { if (args == null) { return Collections.emptyList(); } final Matcher matcher = ARGUMENTS_TOKENIZE_PATTERN.matcher(args); final List<String> tokens = new ArrayList<>(); while (matcher.find()) { tokens.add(matcher.group() .trim()...
JarHandlerUtils { public static List<String> tokenizeArguments(@Nullable final String args) { if (args == null) { return Collections.emptyList(); } final Matcher matcher = ARGUMENTS_TOKENIZE_PATTERN.matcher(args); final List<String> tokens = new ArrayList<>(); while (matcher.find()) { tokens.add(matcher.group() .trim()...
JarHandlerUtils { public static List<String> tokenizeArguments(@Nullable final String args) { if (args == null) { return Collections.emptyList(); } final Matcher matcher = ARGUMENTS_TOKENIZE_PATTERN.matcher(args); final List<String> tokens = new ArrayList<>(); while (matcher.find()) { tokens.add(matcher.group() .trim()...
JarHandlerUtils { public static List<String> tokenizeArguments(@Nullable final String args) { if (args == null) { return Collections.emptyList(); } final Matcher matcher = ARGUMENTS_TOKENIZE_PATTERN.matcher(args); final List<String> tokens = new ArrayList<>(); while (matcher.find()) { tokens.add(matcher.group() .trim()...
@Test public void testDisableGenericTypes() { ExecutionConfig conf = new ExecutionConfig(); TypeInformation<Object> typeInfo = new GenericTypeInfo<Object>(Object.class); TypeSerializer<Object> serializer = typeInfo.createSerializer(conf); assertTrue(serializer instanceof KryoSerializer); conf.disableGenericTypes(); try...
public void disableGenericTypes() { disableGenericTypes = true; }
ExecutionConfig implements Serializable, Archiveable<ArchivedExecutionConfig> { public void disableGenericTypes() { disableGenericTypes = true; } }
ExecutionConfig implements Serializable, Archiveable<ArchivedExecutionConfig> { public void disableGenericTypes() { disableGenericTypes = true; } }
ExecutionConfig implements Serializable, Archiveable<ArchivedExecutionConfig> { public void disableGenericTypes() { disableGenericTypes = true; } ExecutionConfig enableClosureCleaner(); ExecutionConfig disableClosureCleaner(); boolean isClosureCleanerEnabled(); @PublicEvolving ExecutionConfig setAutoWatermarkInterval(...
ExecutionConfig implements Serializable, Archiveable<ArchivedExecutionConfig> { public void disableGenericTypes() { disableGenericTypes = true; } ExecutionConfig enableClosureCleaner(); ExecutionConfig disableClosureCleaner(); boolean isClosureCleanerEnabled(); @PublicEvolving ExecutionConfig setAutoWatermarkInterval(...
@Test public void testTokenizeSingleQuoted() { final List<String> arguments = JarHandlerUtils.tokenizeArguments("--foo 'bar baz '"); assertThat(arguments.get(0), equalTo("--foo")); assertThat(arguments.get(1), equalTo("bar baz ")); }
public static List<String> tokenizeArguments(@Nullable final String args) { if (args == null) { return Collections.emptyList(); } final Matcher matcher = ARGUMENTS_TOKENIZE_PATTERN.matcher(args); final List<String> tokens = new ArrayList<>(); while (matcher.find()) { tokens.add(matcher.group() .trim() .replace("\"", ""...
JarHandlerUtils { public static List<String> tokenizeArguments(@Nullable final String args) { if (args == null) { return Collections.emptyList(); } final Matcher matcher = ARGUMENTS_TOKENIZE_PATTERN.matcher(args); final List<String> tokens = new ArrayList<>(); while (matcher.find()) { tokens.add(matcher.group() .trim()...
JarHandlerUtils { public static List<String> tokenizeArguments(@Nullable final String args) { if (args == null) { return Collections.emptyList(); } final Matcher matcher = ARGUMENTS_TOKENIZE_PATTERN.matcher(args); final List<String> tokens = new ArrayList<>(); while (matcher.find()) { tokens.add(matcher.group() .trim()...
JarHandlerUtils { public static List<String> tokenizeArguments(@Nullable final String args) { if (args == null) { return Collections.emptyList(); } final Matcher matcher = ARGUMENTS_TOKENIZE_PATTERN.matcher(args); final List<String> tokens = new ArrayList<>(); while (matcher.find()) { tokens.add(matcher.group() .trim()...
JarHandlerUtils { public static List<String> tokenizeArguments(@Nullable final String args) { if (args == null) { return Collections.emptyList(); } final Matcher matcher = ARGUMENTS_TOKENIZE_PATTERN.matcher(args); final List<String> tokens = new ArrayList<>(); while (matcher.find()) { tokens.add(matcher.group() .trim()...
@Test public void testLocalFilesystem() throws Exception { final File tempdir = new File(temporaryFolder.getRoot(), UUID.randomUUID().toString()); final File testfile1 = new File(tempdir, UUID.randomUUID().toString()); final File testfile2 = new File(tempdir, UUID.randomUUID().toString()); final Path pathtotestfile1 = ...
public LocalFileSystem() { this.workingDir = new File(System.getProperty("user.dir")).toURI(); this.homeDir = new File(System.getProperty("user.home")).toURI(); String tmp = "unknownHost"; try { tmp = InetAddress.getLocalHost().getHostName(); } catch (UnknownHostException e) { LOG.error("Could not resolve local host", ...
LocalFileSystem extends FileSystem { public LocalFileSystem() { this.workingDir = new File(System.getProperty("user.dir")).toURI(); this.homeDir = new File(System.getProperty("user.home")).toURI(); String tmp = "unknownHost"; try { tmp = InetAddress.getLocalHost().getHostName(); } catch (UnknownHostException e) { LOG.e...
LocalFileSystem extends FileSystem { public LocalFileSystem() { this.workingDir = new File(System.getProperty("user.dir")).toURI(); this.homeDir = new File(System.getProperty("user.home")).toURI(); String tmp = "unknownHost"; try { tmp = InetAddress.getLocalHost().getHostName(); } catch (UnknownHostException e) { LOG.e...
LocalFileSystem extends FileSystem { public LocalFileSystem() { this.workingDir = new File(System.getProperty("user.dir")).toURI(); this.homeDir = new File(System.getProperty("user.home")).toURI(); String tmp = "unknownHost"; try { tmp = InetAddress.getLocalHost().getHostName(); } catch (UnknownHostException e) { LOG.e...
LocalFileSystem extends FileSystem { public LocalFileSystem() { this.workingDir = new File(System.getProperty("user.dir")).toURI(); this.homeDir = new File(System.getProperty("user.home")).toURI(); String tmp = "unknownHost"; try { tmp = InetAddress.getLocalHost().getHostName(); } catch (UnknownHostException e) { LOG.e...
@Test public void testTokenizeDoubleQuoted() { final List<String> arguments = JarHandlerUtils.tokenizeArguments("--name \"K. Bote \""); assertThat(arguments.get(0), equalTo("--name")); assertThat(arguments.get(1), equalTo("K. Bote ")); }
public static List<String> tokenizeArguments(@Nullable final String args) { if (args == null) { return Collections.emptyList(); } final Matcher matcher = ARGUMENTS_TOKENIZE_PATTERN.matcher(args); final List<String> tokens = new ArrayList<>(); while (matcher.find()) { tokens.add(matcher.group() .trim() .replace("\"", ""...
JarHandlerUtils { public static List<String> tokenizeArguments(@Nullable final String args) { if (args == null) { return Collections.emptyList(); } final Matcher matcher = ARGUMENTS_TOKENIZE_PATTERN.matcher(args); final List<String> tokens = new ArrayList<>(); while (matcher.find()) { tokens.add(matcher.group() .trim()...
JarHandlerUtils { public static List<String> tokenizeArguments(@Nullable final String args) { if (args == null) { return Collections.emptyList(); } final Matcher matcher = ARGUMENTS_TOKENIZE_PATTERN.matcher(args); final List<String> tokens = new ArrayList<>(); while (matcher.find()) { tokens.add(matcher.group() .trim()...
JarHandlerUtils { public static List<String> tokenizeArguments(@Nullable final String args) { if (args == null) { return Collections.emptyList(); } final Matcher matcher = ARGUMENTS_TOKENIZE_PATTERN.matcher(args); final List<String> tokens = new ArrayList<>(); while (matcher.find()) { tokens.add(matcher.group() .trim()...
JarHandlerUtils { public static List<String> tokenizeArguments(@Nullable final String args) { if (args == null) { return Collections.emptyList(); } final Matcher matcher = ARGUMENTS_TOKENIZE_PATTERN.matcher(args); final List<String> tokens = new ArrayList<>(); while (matcher.find()) { tokens.add(matcher.group() .trim()...
@Test public void testRenameNonExistingFile() throws IOException { final FileSystem fs = FileSystem.getLocalFileSystem(); final File srcFile = new File(temporaryFolder.newFolder(), "someFile.txt"); final File destFile = new File(temporaryFolder.newFolder(), "target"); final Path srcFilePath = new Path(srcFile.toURI());...
@Override public boolean rename(final Path src, final Path dst) throws IOException { final File srcFile = pathToFile(src); final File dstFile = pathToFile(dst); final File dstParent = dstFile.getParentFile(); dstParent.mkdirs(); try { Files.move(srcFile.toPath(), dstFile.toPath(), StandardCopyOption.REPLACE_EXISTING); ...
LocalFileSystem extends FileSystem { @Override public boolean rename(final Path src, final Path dst) throws IOException { final File srcFile = pathToFile(src); final File dstFile = pathToFile(dst); final File dstParent = dstFile.getParentFile(); dstParent.mkdirs(); try { Files.move(srcFile.toPath(), dstFile.toPath(), S...
LocalFileSystem extends FileSystem { @Override public boolean rename(final Path src, final Path dst) throws IOException { final File srcFile = pathToFile(src); final File dstFile = pathToFile(dst); final File dstParent = dstFile.getParentFile(); dstParent.mkdirs(); try { Files.move(srcFile.toPath(), dstFile.toPath(), S...
LocalFileSystem extends FileSystem { @Override public boolean rename(final Path src, final Path dst) throws IOException { final File srcFile = pathToFile(src); final File dstFile = pathToFile(dst); final File dstParent = dstFile.getParentFile(); dstParent.mkdirs(); try { Files.move(srcFile.toPath(), dstFile.toPath(), S...
LocalFileSystem extends FileSystem { @Override public boolean rename(final Path src, final Path dst) throws IOException { final File srcFile = pathToFile(src); final File dstFile = pathToFile(dst); final File dstParent = dstFile.getParentFile(); dstParent.mkdirs(); try { Files.move(srcFile.toPath(), dstFile.toPath(), S...
@Test public void testRenameFileWithNoAccess() throws IOException { final FileSystem fs = FileSystem.getLocalFileSystem(); final File srcFile = temporaryFolder.newFile("someFile.txt"); final File destFile = new File(temporaryFolder.newFolder(), "target"); Assume.assumeTrue(srcFile.getParentFile().setWritable(false, fal...
@Override public boolean rename(final Path src, final Path dst) throws IOException { final File srcFile = pathToFile(src); final File dstFile = pathToFile(dst); final File dstParent = dstFile.getParentFile(); dstParent.mkdirs(); try { Files.move(srcFile.toPath(), dstFile.toPath(), StandardCopyOption.REPLACE_EXISTING); ...
LocalFileSystem extends FileSystem { @Override public boolean rename(final Path src, final Path dst) throws IOException { final File srcFile = pathToFile(src); final File dstFile = pathToFile(dst); final File dstParent = dstFile.getParentFile(); dstParent.mkdirs(); try { Files.move(srcFile.toPath(), dstFile.toPath(), S...
LocalFileSystem extends FileSystem { @Override public boolean rename(final Path src, final Path dst) throws IOException { final File srcFile = pathToFile(src); final File dstFile = pathToFile(dst); final File dstParent = dstFile.getParentFile(); dstParent.mkdirs(); try { Files.move(srcFile.toPath(), dstFile.toPath(), S...
LocalFileSystem extends FileSystem { @Override public boolean rename(final Path src, final Path dst) throws IOException { final File srcFile = pathToFile(src); final File dstFile = pathToFile(dst); final File dstParent = dstFile.getParentFile(); dstParent.mkdirs(); try { Files.move(srcFile.toPath(), dstFile.toPath(), S...
LocalFileSystem extends FileSystem { @Override public boolean rename(final Path src, final Path dst) throws IOException { final File srcFile = pathToFile(src); final File dstFile = pathToFile(dst); final File dstParent = dstFile.getParentFile(); dstParent.mkdirs(); try { Files.move(srcFile.toPath(), dstFile.toPath(), S...
@Test public void testKind() { final FileSystem fs = FileSystem.getLocalFileSystem(); assertEquals(FileSystemKind.FILE_SYSTEM, fs.getKind()); }
@Override public FileSystemKind getKind() { return FileSystemKind.FILE_SYSTEM; }
LocalFileSystem extends FileSystem { @Override public FileSystemKind getKind() { return FileSystemKind.FILE_SYSTEM; } }
LocalFileSystem extends FileSystem { @Override public FileSystemKind getKind() { return FileSystemKind.FILE_SYSTEM; } LocalFileSystem(); }
LocalFileSystem extends FileSystem { @Override public FileSystemKind getKind() { return FileSystemKind.FILE_SYSTEM; } LocalFileSystem(); @Override BlockLocation[] getFileBlockLocations(FileStatus file, long start, long len); @Override FileStatus getFileStatus(Path f); @Override URI getUri(); @Override Path getWorkingDi...
LocalFileSystem extends FileSystem { @Override public FileSystemKind getKind() { return FileSystemKind.FILE_SYSTEM; } LocalFileSystem(); @Override BlockLocation[] getFileBlockLocations(FileStatus file, long start, long len); @Override FileStatus getFileStatus(Path f); @Override URI getUri(); @Override Path getWorkingDi...
@Test public void testRejectNonJarFiles() throws Exception { final Path uploadedFile = Files.createFile(jarDir.resolve("katrin.png")); final HandlerRequest<FileUpload, EmptyMessageParameters> request = createRequest(uploadedFile); try { jarUploadHandler.handleRequest(request, mockDispatcherGateway).get(); fail("Expecte...
@Override protected CompletableFuture<JarUploadResponseBody> handleRequest( @Nonnull final HandlerRequest<FileUpload, EmptyMessageParameters> request, @Nonnull final RestfulGateway gateway) throws RestHandlerException { final FileUpload fileUpload = request.getRequestBody(); return CompletableFuture.supplyAsync(() -> {...
JarUploadHandler extends AbstractRestHandler<RestfulGateway, FileUpload, JarUploadResponseBody, EmptyMessageParameters> { @Override protected CompletableFuture<JarUploadResponseBody> handleRequest( @Nonnull final HandlerRequest<FileUpload, EmptyMessageParameters> request, @Nonnull final RestfulGateway gateway) throws...
JarUploadHandler extends AbstractRestHandler<RestfulGateway, FileUpload, JarUploadResponseBody, EmptyMessageParameters> { @Override protected CompletableFuture<JarUploadResponseBody> handleRequest( @Nonnull final HandlerRequest<FileUpload, EmptyMessageParameters> request, @Nonnull final RestfulGateway gateway) throws...
JarUploadHandler extends AbstractRestHandler<RestfulGateway, FileUpload, JarUploadResponseBody, EmptyMessageParameters> { @Override protected CompletableFuture<JarUploadResponseBody> handleRequest( @Nonnull final HandlerRequest<FileUpload, EmptyMessageParameters> request, @Nonnull final RestfulGateway gateway) throws...
JarUploadHandler extends AbstractRestHandler<RestfulGateway, FileUpload, JarUploadResponseBody, EmptyMessageParameters> { @Override protected CompletableFuture<JarUploadResponseBody> handleRequest( @Nonnull final HandlerRequest<FileUpload, EmptyMessageParameters> request, @Nonnull final RestfulGateway gateway) throws...
@Test public void testUploadJar() throws Exception { final Path uploadedFile = Files.createFile(jarDir.resolve("Kafka010Example.jar")); final HandlerRequest<FileUpload, EmptyMessageParameters> request = createRequest(uploadedFile); final JarUploadResponseBody jarUploadResponseBody = jarUploadHandler.handleRequest(reque...
@Override protected CompletableFuture<JarUploadResponseBody> handleRequest( @Nonnull final HandlerRequest<FileUpload, EmptyMessageParameters> request, @Nonnull final RestfulGateway gateway) throws RestHandlerException { final FileUpload fileUpload = request.getRequestBody(); return CompletableFuture.supplyAsync(() -> {...
JarUploadHandler extends AbstractRestHandler<RestfulGateway, FileUpload, JarUploadResponseBody, EmptyMessageParameters> { @Override protected CompletableFuture<JarUploadResponseBody> handleRequest( @Nonnull final HandlerRequest<FileUpload, EmptyMessageParameters> request, @Nonnull final RestfulGateway gateway) throws...
JarUploadHandler extends AbstractRestHandler<RestfulGateway, FileUpload, JarUploadResponseBody, EmptyMessageParameters> { @Override protected CompletableFuture<JarUploadResponseBody> handleRequest( @Nonnull final HandlerRequest<FileUpload, EmptyMessageParameters> request, @Nonnull final RestfulGateway gateway) throws...
JarUploadHandler extends AbstractRestHandler<RestfulGateway, FileUpload, JarUploadResponseBody, EmptyMessageParameters> { @Override protected CompletableFuture<JarUploadResponseBody> handleRequest( @Nonnull final HandlerRequest<FileUpload, EmptyMessageParameters> request, @Nonnull final RestfulGateway gateway) throws...
JarUploadHandler extends AbstractRestHandler<RestfulGateway, FileUpload, JarUploadResponseBody, EmptyMessageParameters> { @Override protected CompletableFuture<JarUploadResponseBody> handleRequest( @Nonnull final HandlerRequest<FileUpload, EmptyMessageParameters> request, @Nonnull final RestfulGateway gateway) throws...
@Test public void testTypeInfoDeserialization() throws Exception { long id = 1238123899121L; String name = "asdlkjasjkdla998y1122"; byte[] bytes = new byte[1024]; ThreadLocalRandom.current().nextBytes(bytes); ObjectMapper objectMapper = new ObjectMapper(); ObjectNode root = objectMapper.createObjectNode(); root.put("id...
@SuppressWarnings("unchecked") @Override public Row deserialize(byte[] message) throws IOException { try { final JsonNode root = objectMapper.readTree(message); return convertRow(root, (RowTypeInfo) typeInfo); } catch (Throwable t) { throw new IOException("Failed to deserialize JSON object.", t); } }
JsonRowDeserializationSchema implements DeserializationSchema<Row> { @SuppressWarnings("unchecked") @Override public Row deserialize(byte[] message) throws IOException { try { final JsonNode root = objectMapper.readTree(message); return convertRow(root, (RowTypeInfo) typeInfo); } catch (Throwable t) { throw new IOExcep...
JsonRowDeserializationSchema implements DeserializationSchema<Row> { @SuppressWarnings("unchecked") @Override public Row deserialize(byte[] message) throws IOException { try { final JsonNode root = objectMapper.readTree(message); return convertRow(root, (RowTypeInfo) typeInfo); } catch (Throwable t) { throw new IOExcep...
JsonRowDeserializationSchema implements DeserializationSchema<Row> { @SuppressWarnings("unchecked") @Override public Row deserialize(byte[] message) throws IOException { try { final JsonNode root = objectMapper.readTree(message); return convertRow(root, (RowTypeInfo) typeInfo); } catch (Throwable t) { throw new IOExcep...
JsonRowDeserializationSchema implements DeserializationSchema<Row> { @SuppressWarnings("unchecked") @Override public Row deserialize(byte[] message) throws IOException { try { final JsonNode root = objectMapper.readTree(message); return convertRow(root, (RowTypeInfo) typeInfo); } catch (Throwable t) { throw new IOExcep...
@Test public void testSchemaDeserialization() throws Exception { final BigInteger id = BigInteger.valueOf(1238123899121L); final String name = "asdlkjasjkdla998y1122"; final byte[] bytes = new byte[1024]; ThreadLocalRandom.current().nextBytes(bytes); final BigInteger[] numbers = new BigInteger[] { BigInteger.valueOf(1)...
@SuppressWarnings("unchecked") @Override public Row deserialize(byte[] message) throws IOException { try { final JsonNode root = objectMapper.readTree(message); return convertRow(root, (RowTypeInfo) typeInfo); } catch (Throwable t) { throw new IOException("Failed to deserialize JSON object.", t); } }
JsonRowDeserializationSchema implements DeserializationSchema<Row> { @SuppressWarnings("unchecked") @Override public Row deserialize(byte[] message) throws IOException { try { final JsonNode root = objectMapper.readTree(message); return convertRow(root, (RowTypeInfo) typeInfo); } catch (Throwable t) { throw new IOExcep...
JsonRowDeserializationSchema implements DeserializationSchema<Row> { @SuppressWarnings("unchecked") @Override public Row deserialize(byte[] message) throws IOException { try { final JsonNode root = objectMapper.readTree(message); return convertRow(root, (RowTypeInfo) typeInfo); } catch (Throwable t) { throw new IOExcep...
JsonRowDeserializationSchema implements DeserializationSchema<Row> { @SuppressWarnings("unchecked") @Override public Row deserialize(byte[] message) throws IOException { try { final JsonNode root = objectMapper.readTree(message); return convertRow(root, (RowTypeInfo) typeInfo); } catch (Throwable t) { throw new IOExcep...
JsonRowDeserializationSchema implements DeserializationSchema<Row> { @SuppressWarnings("unchecked") @Override public Row deserialize(byte[] message) throws IOException { try { final JsonNode root = objectMapper.readTree(message); return convertRow(root, (RowTypeInfo) typeInfo); } catch (Throwable t) { throw new IOExcep...
@Test public void testFailedUpload() throws Exception { final Path uploadedFile = jarDir.resolve("Kafka010Example.jar"); final HandlerRequest<FileUpload, EmptyMessageParameters> request = createRequest(uploadedFile); try { jarUploadHandler.handleRequest(request, mockDispatcherGateway).get(); fail("Expected exception no...
@Override protected CompletableFuture<JarUploadResponseBody> handleRequest( @Nonnull final HandlerRequest<FileUpload, EmptyMessageParameters> request, @Nonnull final RestfulGateway gateway) throws RestHandlerException { final FileUpload fileUpload = request.getRequestBody(); return CompletableFuture.supplyAsync(() -> {...
JarUploadHandler extends AbstractRestHandler<RestfulGateway, FileUpload, JarUploadResponseBody, EmptyMessageParameters> { @Override protected CompletableFuture<JarUploadResponseBody> handleRequest( @Nonnull final HandlerRequest<FileUpload, EmptyMessageParameters> request, @Nonnull final RestfulGateway gateway) throws...
JarUploadHandler extends AbstractRestHandler<RestfulGateway, FileUpload, JarUploadResponseBody, EmptyMessageParameters> { @Override protected CompletableFuture<JarUploadResponseBody> handleRequest( @Nonnull final HandlerRequest<FileUpload, EmptyMessageParameters> request, @Nonnull final RestfulGateway gateway) throws...
JarUploadHandler extends AbstractRestHandler<RestfulGateway, FileUpload, JarUploadResponseBody, EmptyMessageParameters> { @Override protected CompletableFuture<JarUploadResponseBody> handleRequest( @Nonnull final HandlerRequest<FileUpload, EmptyMessageParameters> request, @Nonnull final RestfulGateway gateway) throws...
JarUploadHandler extends AbstractRestHandler<RestfulGateway, FileUpload, JarUploadResponseBody, EmptyMessageParameters> { @Override protected CompletableFuture<JarUploadResponseBody> handleRequest( @Nonnull final HandlerRequest<FileUpload, EmptyMessageParameters> request, @Nonnull final RestfulGateway gateway) throws...
@Test public void testSerializationOfTwoRows() throws IOException { final TypeInformation<Row> rowSchema = Types.ROW_NAMED( new String[] {"f1", "f2", "f3"}, Types.INT, Types.BOOLEAN, Types.STRING); final Row row1 = new Row(3); row1.setField(0, 1); row1.setField(1, true); row1.setField(2, "str"); final JsonRowSerializat...
@Override public byte[] serialize(Row row) { if (node == null) { node = mapper.createObjectNode(); } try { convertRow(node, (RowTypeInfo) typeInfo, row); return mapper.writeValueAsBytes(node); } catch (Throwable t) { throw new RuntimeException("Could not serialize row '" + row + "'. " + "Make sure that the schema match...
JsonRowSerializationSchema implements SerializationSchema<Row> { @Override public byte[] serialize(Row row) { if (node == null) { node = mapper.createObjectNode(); } try { convertRow(node, (RowTypeInfo) typeInfo, row); return mapper.writeValueAsBytes(node); } catch (Throwable t) { throw new RuntimeException("Could not ...
JsonRowSerializationSchema implements SerializationSchema<Row> { @Override public byte[] serialize(Row row) { if (node == null) { node = mapper.createObjectNode(); } try { convertRow(node, (RowTypeInfo) typeInfo, row); return mapper.writeValueAsBytes(node); } catch (Throwable t) { throw new RuntimeException("Could not ...
JsonRowSerializationSchema implements SerializationSchema<Row> { @Override public byte[] serialize(Row row) { if (node == null) { node = mapper.createObjectNode(); } try { convertRow(node, (RowTypeInfo) typeInfo, row); return mapper.writeValueAsBytes(node); } catch (Throwable t) { throw new RuntimeException("Could not ...
JsonRowSerializationSchema implements SerializationSchema<Row> { @Override public byte[] serialize(Row row) { if (node == null) { node = mapper.createObjectNode(); } try { convertRow(node, (RowTypeInfo) typeInfo, row); return mapper.writeValueAsBytes(node); } catch (Throwable t) { throw new RuntimeException("Could not ...
@Test(expected = RuntimeException.class) public void testSerializeRowWithInvalidNumberOfFields() { final TypeInformation<Row> rowSchema = Types.ROW_NAMED( new String[] {"f1", "f2", "f3"}, Types.INT, Types.BOOLEAN, Types.STRING); final Row row = new Row(1); row.setField(0, 1); final JsonRowSerializationSchema serializat...
@Override public byte[] serialize(Row row) { if (node == null) { node = mapper.createObjectNode(); } try { convertRow(node, (RowTypeInfo) typeInfo, row); return mapper.writeValueAsBytes(node); } catch (Throwable t) { throw new RuntimeException("Could not serialize row '" + row + "'. " + "Make sure that the schema match...
JsonRowSerializationSchema implements SerializationSchema<Row> { @Override public byte[] serialize(Row row) { if (node == null) { node = mapper.createObjectNode(); } try { convertRow(node, (RowTypeInfo) typeInfo, row); return mapper.writeValueAsBytes(node); } catch (Throwable t) { throw new RuntimeException("Could not ...
JsonRowSerializationSchema implements SerializationSchema<Row> { @Override public byte[] serialize(Row row) { if (node == null) { node = mapper.createObjectNode(); } try { convertRow(node, (RowTypeInfo) typeInfo, row); return mapper.writeValueAsBytes(node); } catch (Throwable t) { throw new RuntimeException("Could not ...
JsonRowSerializationSchema implements SerializationSchema<Row> { @Override public byte[] serialize(Row row) { if (node == null) { node = mapper.createObjectNode(); } try { convertRow(node, (RowTypeInfo) typeInfo, row); return mapper.writeValueAsBytes(node); } catch (Throwable t) { throw new RuntimeException("Could not ...
JsonRowSerializationSchema implements SerializationSchema<Row> { @Override public byte[] serialize(Row row) { if (node == null) { node = mapper.createObjectNode(); } try { convertRow(node, (RowTypeInfo) typeInfo, row); return mapper.writeValueAsBytes(node); } catch (Throwable t) { throw new RuntimeException("Could not ...
@Test public void testConvertStringToValue() { assertEquals("false", allowNonRestoredStateQueryParameter.convertValueToString(false)); assertEquals("true", allowNonRestoredStateQueryParameter.convertValueToString(true)); }
@Override public Boolean convertStringToValue(final String value) { return Boolean.valueOf(value); }
AllowNonRestoredStateQueryParameter extends MessageQueryParameter<Boolean> { @Override public Boolean convertStringToValue(final String value) { return Boolean.valueOf(value); } }
AllowNonRestoredStateQueryParameter extends MessageQueryParameter<Boolean> { @Override public Boolean convertStringToValue(final String value) { return Boolean.valueOf(value); } protected AllowNonRestoredStateQueryParameter(); }
AllowNonRestoredStateQueryParameter extends MessageQueryParameter<Boolean> { @Override public Boolean convertStringToValue(final String value) { return Boolean.valueOf(value); } protected AllowNonRestoredStateQueryParameter(); @Override Boolean convertStringToValue(final String value); @Override String convertValueToS...
AllowNonRestoredStateQueryParameter extends MessageQueryParameter<Boolean> { @Override public Boolean convertStringToValue(final String value) { return Boolean.valueOf(value); } protected AllowNonRestoredStateQueryParameter(); @Override Boolean convertStringToValue(final String value); @Override String convertValueToS...
@Test public void testSchema() throws IOException { final TypeInformation<Row> rowSchema = JsonSchemaConverter.convert( "{" + " type: 'object'," + " properties: {" + " id: { type: 'integer' }," + " idNumber: { type: 'number' }," + " idOrNull: { type: ['integer', 'null'] }," + " name: { type: 'string' }," + " date: { ty...
private JsonNode convert(ContainerNode<?> container, JsonNode reuse, TypeInformation<?> info, Object object) { if (info == Types.VOID || object == null) { return container.nullNode(); } else if (info == Types.BOOLEAN) { return container.booleanNode((Boolean) object); } else if (info == Types.STRING) { return container....
JsonRowSerializationSchema implements SerializationSchema<Row> { private JsonNode convert(ContainerNode<?> container, JsonNode reuse, TypeInformation<?> info, Object object) { if (info == Types.VOID || object == null) { return container.nullNode(); } else if (info == Types.BOOLEAN) { return container.booleanNode((Boole...
JsonRowSerializationSchema implements SerializationSchema<Row> { private JsonNode convert(ContainerNode<?> container, JsonNode reuse, TypeInformation<?> info, Object object) { if (info == Types.VOID || object == null) { return container.nullNode(); } else if (info == Types.BOOLEAN) { return container.booleanNode((Boole...
JsonRowSerializationSchema implements SerializationSchema<Row> { private JsonNode convert(ContainerNode<?> container, JsonNode reuse, TypeInformation<?> info, Object object) { if (info == Types.VOID || object == null) { return container.nullNode(); } else if (info == Types.BOOLEAN) { return container.booleanNode((Boole...
JsonRowSerializationSchema implements SerializationSchema<Row> { private JsonNode convert(ContainerNode<?> container, JsonNode reuse, TypeInformation<?> info, Object object) { if (info == Types.VOID || object == null) { return container.nullNode(); } else if (info == Types.BOOLEAN) { return container.booleanNode((Boole...
@Test(timeout = 10000) public void testCloseWithoutAssignedPartitions() throws Exception { final KafkaConsumer<byte[], byte[]> mockConsumer = createMockConsumer( new LinkedHashMap<TopicPartition, Long>(), Collections.<TopicPartition, Long>emptyMap(), false, null, null); final MultiShotLatch getBatchBlockingInvoked = ne...
public void shutdown() { running = false; unassignedPartitionsQueue.close(); handover.wakeupProducer(); synchronized (consumerReassignmentLock) { if (consumer != null) { consumer.wakeup(); } else { hasBufferedWakeup = true; } } }
KafkaConsumerThread extends Thread { public void shutdown() { running = false; unassignedPartitionsQueue.close(); handover.wakeupProducer(); synchronized (consumerReassignmentLock) { if (consumer != null) { consumer.wakeup(); } else { hasBufferedWakeup = true; } } } }
KafkaConsumerThread extends Thread { public void shutdown() { running = false; unassignedPartitionsQueue.close(); handover.wakeupProducer(); synchronized (consumerReassignmentLock) { if (consumer != null) { consumer.wakeup(); } else { hasBufferedWakeup = true; } } } KafkaConsumerThread( Logger log, Handover hando...
KafkaConsumerThread extends Thread { public void shutdown() { running = false; unassignedPartitionsQueue.close(); handover.wakeupProducer(); synchronized (consumerReassignmentLock) { if (consumer != null) { consumer.wakeup(); } else { hasBufferedWakeup = true; } } } KafkaConsumerThread( Logger log, Handover hando...
KafkaConsumerThread extends Thread { public void shutdown() { running = false; unassignedPartitionsQueue.close(); handover.wakeupProducer(); synchronized (consumerReassignmentLock) { if (consumer != null) { consumer.wakeup(); } else { hasBufferedWakeup = true; } } } KafkaConsumerThread( Logger log, Handover hando...
@SuppressWarnings("unchecked") @Test(timeout = 10000) public void testReassigningPartitionsWithDefinedOffsetsWhenEarlyWakeup() throws Exception { final String testTopic = "test-topic"; KafkaTopicPartitionState<TopicPartition> oldPartition1 = new KafkaTopicPartitionState<>( new KafkaTopicPartition(testTopic, 0), new Top...
void setOffsetsToCommit( Map<TopicPartition, OffsetAndMetadata> offsetsToCommit, @Nonnull KafkaCommitCallback commitCallback) { if (nextOffsetsToCommit.getAndSet(Tuple2.of(offsetsToCommit, commitCallback)) != null) { log.warn("Committing offsets to Kafka takes longer than the checkpoint interval. " + "Skipping commit o...
KafkaConsumerThread extends Thread { void setOffsetsToCommit( Map<TopicPartition, OffsetAndMetadata> offsetsToCommit, @Nonnull KafkaCommitCallback commitCallback) { if (nextOffsetsToCommit.getAndSet(Tuple2.of(offsetsToCommit, commitCallback)) != null) { log.warn("Committing offsets to Kafka takes longer than the checkp...
KafkaConsumerThread extends Thread { void setOffsetsToCommit( Map<TopicPartition, OffsetAndMetadata> offsetsToCommit, @Nonnull KafkaCommitCallback commitCallback) { if (nextOffsetsToCommit.getAndSet(Tuple2.of(offsetsToCommit, commitCallback)) != null) { log.warn("Committing offsets to Kafka takes longer than the checkp...
KafkaConsumerThread extends Thread { void setOffsetsToCommit( Map<TopicPartition, OffsetAndMetadata> offsetsToCommit, @Nonnull KafkaCommitCallback commitCallback) { if (nextOffsetsToCommit.getAndSet(Tuple2.of(offsetsToCommit, commitCallback)) != null) { log.warn("Committing offsets to Kafka takes longer than the checkp...
KafkaConsumerThread extends Thread { void setOffsetsToCommit( Map<TopicPartition, OffsetAndMetadata> offsetsToCommit, @Nonnull KafkaCommitCallback commitCallback) { if (nextOffsetsToCommit.getAndSet(Tuple2.of(offsetsToCommit, commitCallback)) != null) { log.warn("Committing offsets to Kafka takes longer than the checkp...
@SuppressWarnings("unchecked") @Test(timeout = 10000) public void testReassignPartitionsDefinedOffsetsWithoutInitialAssignmentsWhenEarlyWakeup() throws Exception { final String testTopic = "test-topic"; KafkaTopicPartitionState<TopicPartition> newPartition1 = new KafkaTopicPartitionState<>( new KafkaTopicPartition(test...
void setOffsetsToCommit( Map<TopicPartition, OffsetAndMetadata> offsetsToCommit, @Nonnull KafkaCommitCallback commitCallback) { if (nextOffsetsToCommit.getAndSet(Tuple2.of(offsetsToCommit, commitCallback)) != null) { log.warn("Committing offsets to Kafka takes longer than the checkpoint interval. " + "Skipping commit o...
KafkaConsumerThread extends Thread { void setOffsetsToCommit( Map<TopicPartition, OffsetAndMetadata> offsetsToCommit, @Nonnull KafkaCommitCallback commitCallback) { if (nextOffsetsToCommit.getAndSet(Tuple2.of(offsetsToCommit, commitCallback)) != null) { log.warn("Committing offsets to Kafka takes longer than the checkp...
KafkaConsumerThread extends Thread { void setOffsetsToCommit( Map<TopicPartition, OffsetAndMetadata> offsetsToCommit, @Nonnull KafkaCommitCallback commitCallback) { if (nextOffsetsToCommit.getAndSet(Tuple2.of(offsetsToCommit, commitCallback)) != null) { log.warn("Committing offsets to Kafka takes longer than the checkp...
KafkaConsumerThread extends Thread { void setOffsetsToCommit( Map<TopicPartition, OffsetAndMetadata> offsetsToCommit, @Nonnull KafkaCommitCallback commitCallback) { if (nextOffsetsToCommit.getAndSet(Tuple2.of(offsetsToCommit, commitCallback)) != null) { log.warn("Committing offsets to Kafka takes longer than the checkp...
KafkaConsumerThread extends Thread { void setOffsetsToCommit( Map<TopicPartition, OffsetAndMetadata> offsetsToCommit, @Nonnull KafkaCommitCallback commitCallback) { if (nextOffsetsToCommit.getAndSet(Tuple2.of(offsetsToCommit, commitCallback)) != null) { log.warn("Committing offsets to Kafka takes longer than the checkp...
@SuppressWarnings("unchecked") @Test(timeout = 10000) public void testReassignPartitionsDefinedOffsetsWithoutInitialAssignmentsWhenWakeupMidway() throws Exception { final String testTopic = "test-topic"; KafkaTopicPartitionState<TopicPartition> newPartition1 = new KafkaTopicPartitionState<>( new KafkaTopicPartition(tes...
void setOffsetsToCommit( Map<TopicPartition, OffsetAndMetadata> offsetsToCommit, @Nonnull KafkaCommitCallback commitCallback) { if (nextOffsetsToCommit.getAndSet(Tuple2.of(offsetsToCommit, commitCallback)) != null) { log.warn("Committing offsets to Kafka takes longer than the checkpoint interval. " + "Skipping commit o...
KafkaConsumerThread extends Thread { void setOffsetsToCommit( Map<TopicPartition, OffsetAndMetadata> offsetsToCommit, @Nonnull KafkaCommitCallback commitCallback) { if (nextOffsetsToCommit.getAndSet(Tuple2.of(offsetsToCommit, commitCallback)) != null) { log.warn("Committing offsets to Kafka takes longer than the checkp...
KafkaConsumerThread extends Thread { void setOffsetsToCommit( Map<TopicPartition, OffsetAndMetadata> offsetsToCommit, @Nonnull KafkaCommitCallback commitCallback) { if (nextOffsetsToCommit.getAndSet(Tuple2.of(offsetsToCommit, commitCallback)) != null) { log.warn("Committing offsets to Kafka takes longer than the checkp...
KafkaConsumerThread extends Thread { void setOffsetsToCommit( Map<TopicPartition, OffsetAndMetadata> offsetsToCommit, @Nonnull KafkaCommitCallback commitCallback) { if (nextOffsetsToCommit.getAndSet(Tuple2.of(offsetsToCommit, commitCallback)) != null) { log.warn("Committing offsets to Kafka takes longer than the checkp...
KafkaConsumerThread extends Thread { void setOffsetsToCommit( Map<TopicPartition, OffsetAndMetadata> offsetsToCommit, @Nonnull KafkaCommitCallback commitCallback) { if (nextOffsetsToCommit.getAndSet(Tuple2.of(offsetsToCommit, commitCallback)) != null) { log.warn("Committing offsets to Kafka takes longer than the checkp...
@Test public void testConvertValueFromString() { assertEquals(false, allowNonRestoredStateQueryParameter.convertStringToValue("false")); assertEquals(true, allowNonRestoredStateQueryParameter.convertStringToValue("true")); assertEquals(true, allowNonRestoredStateQueryParameter.convertStringToValue("TRUE")); }
@Override public Boolean convertStringToValue(final String value) { return Boolean.valueOf(value); }
AllowNonRestoredStateQueryParameter extends MessageQueryParameter<Boolean> { @Override public Boolean convertStringToValue(final String value) { return Boolean.valueOf(value); } }
AllowNonRestoredStateQueryParameter extends MessageQueryParameter<Boolean> { @Override public Boolean convertStringToValue(final String value) { return Boolean.valueOf(value); } protected AllowNonRestoredStateQueryParameter(); }
AllowNonRestoredStateQueryParameter extends MessageQueryParameter<Boolean> { @Override public Boolean convertStringToValue(final String value) { return Boolean.valueOf(value); } protected AllowNonRestoredStateQueryParameter(); @Override Boolean convertStringToValue(final String value); @Override String convertValueToS...
AllowNonRestoredStateQueryParameter extends MessageQueryParameter<Boolean> { @Override public Boolean convertStringToValue(final String value) { return Boolean.valueOf(value); } protected AllowNonRestoredStateQueryParameter(); @Override Boolean convertStringToValue(final String value); @Override String convertValueToS...
@Test @SuppressWarnings("unchecked") public void testApplyPredicate() throws Exception { OrcTableSource orc = OrcTableSource.builder() .path(getPath(TEST_FILE_NESTED)) .forOrcSchema(TEST_SCHEMA_NESTED) .build(); Expression pred1 = new GreaterThan( new ResolvedFieldReference("int1", Types.INT), new Literal(100, Types.IN...
@Override public TableSource<Row> applyPredicate(List<Expression> predicates) { ArrayList<Predicate> orcPredicates = new ArrayList<>(); for (Expression pred : predicates) { Predicate orcPred = toOrcPredicate(pred); if (orcPred != null) { LOG.info("Predicate [{}] converted into OrcPredicate [{}] and pushed into OrcTable...
OrcTableSource implements BatchTableSource<Row>, ProjectableTableSource<Row>, FilterableTableSource<Row> { @Override public TableSource<Row> applyPredicate(List<Expression> predicates) { ArrayList<Predicate> orcPredicates = new ArrayList<>(); for (Expression pred : predicates) { Predicate orcPred = toOrcPredicate(pred)...
OrcTableSource implements BatchTableSource<Row>, ProjectableTableSource<Row>, FilterableTableSource<Row> { @Override public TableSource<Row> applyPredicate(List<Expression> predicates) { ArrayList<Predicate> orcPredicates = new ArrayList<>(); for (Expression pred : predicates) { Predicate orcPred = toOrcPredicate(pred)...
OrcTableSource implements BatchTableSource<Row>, ProjectableTableSource<Row>, FilterableTableSource<Row> { @Override public TableSource<Row> applyPredicate(List<Expression> predicates) { ArrayList<Predicate> orcPredicates = new ArrayList<>(); for (Expression pred : predicates) { Predicate orcPred = toOrcPredicate(pred)...
OrcTableSource implements BatchTableSource<Row>, ProjectableTableSource<Row>, FilterableTableSource<Row> { @Override public TableSource<Row> applyPredicate(List<Expression> predicates) { ArrayList<Predicate> orcPredicates = new ArrayList<>(); for (Expression pred : predicates) { Predicate orcPred = toOrcPredicate(pred)...
@Test public void testIfDelegatesImplementAllMethods() throws IllegalAccessException, IllegalArgumentException, InvocationTargetException { Method[] confMethods = Configuration.class.getDeclaredMethods(); Method[] delegateMethods = DelegatingConfiguration.class.getDeclaredMethods(); for (Method configurationMethod : co...
@Override public boolean equals(Object obj) { if (obj instanceof DelegatingConfiguration) { DelegatingConfiguration other = (DelegatingConfiguration) obj; return this.prefix.equals(other.prefix) && this.backingConfig.equals(other.backingConfig); } else { return false; } }
DelegatingConfiguration extends Configuration { @Override public boolean equals(Object obj) { if (obj instanceof DelegatingConfiguration) { DelegatingConfiguration other = (DelegatingConfiguration) obj; return this.prefix.equals(other.prefix) && this.backingConfig.equals(other.backingConfig); } else { return false; } }...
DelegatingConfiguration extends Configuration { @Override public boolean equals(Object obj) { if (obj instanceof DelegatingConfiguration) { DelegatingConfiguration other = (DelegatingConfiguration) obj; return this.prefix.equals(other.prefix) && this.backingConfig.equals(other.backingConfig); } else { return false; } }...
DelegatingConfiguration extends Configuration { @Override public boolean equals(Object obj) { if (obj instanceof DelegatingConfiguration) { DelegatingConfiguration other = (DelegatingConfiguration) obj; return this.prefix.equals(other.prefix) && this.backingConfig.equals(other.backingConfig); } else { return false; } }...
DelegatingConfiguration extends Configuration { @Override public boolean equals(Object obj) { if (obj instanceof DelegatingConfiguration) { DelegatingConfiguration other = (DelegatingConfiguration) obj; return this.prefix.equals(other.prefix) && this.backingConfig.equals(other.backingConfig); } else { return false; } }...
@Test public void testInactivityPeriodWithLateNotify() throws Exception { final File outDir = tempFolder.newFolder(); OneInputStreamOperatorTestHarness<String, Object> testHarness = createRescalingTestSink(outDir, 1, 0, 100); testHarness.setup(); testHarness.open(); testHarness.setProcessingTime(0L); testHarness.proces...
@Override public void open(Configuration parameters) throws Exception { super.open(parameters); state = new State<>(); processingTimeService = ((StreamingRuntimeContext) getRuntimeContext()).getProcessingTimeService(); long currentProcessingTime = processingTimeService.getCurrentProcessingTime(); processingTimeService....
BucketingSink extends RichSinkFunction<T> implements InputTypeConfigurable, CheckpointedFunction, CheckpointListener, ProcessingTimeCallback { @Override public void open(Configuration parameters) throws Exception { super.open(parameters); state = new State<>(); processingTimeService = ((StreamingRuntimeContext) getRunt...
BucketingSink extends RichSinkFunction<T> implements InputTypeConfigurable, CheckpointedFunction, CheckpointListener, ProcessingTimeCallback { @Override public void open(Configuration parameters) throws Exception { super.open(parameters); state = new State<>(); processingTimeService = ((StreamingRuntimeContext) getRunt...
BucketingSink extends RichSinkFunction<T> implements InputTypeConfigurable, CheckpointedFunction, CheckpointListener, ProcessingTimeCallback { @Override public void open(Configuration parameters) throws Exception { super.open(parameters); state = new State<>(); processingTimeService = ((StreamingRuntimeContext) getRunt...
BucketingSink extends RichSinkFunction<T> implements InputTypeConfigurable, CheckpointedFunction, CheckpointListener, ProcessingTimeCallback { @Override public void open(Configuration parameters) throws Exception { super.open(parameters); state = new State<>(); processingTimeService = ((StreamingRuntimeContext) getRunt...
@Test public void testDelegationConfigurationWithNullPrefix() { Configuration backingConf = new Configuration(); backingConf.setValueInternal("test-key", "value"); DelegatingConfiguration configuration = new DelegatingConfiguration( backingConf, null); Set<String> keySet = configuration.keySet(); assertEquals(keySet, b...
@Override public Set<String> keySet() { if (this.prefix == null) { return this.backingConfig.keySet(); } final HashSet<String> set = new HashSet<>(); int prefixLen = this.prefix.length(); for (String key : this.backingConfig.keySet()) { if (key.startsWith(prefix)) { set.add(key.substring(prefixLen)); } } return set; }
DelegatingConfiguration extends Configuration { @Override public Set<String> keySet() { if (this.prefix == null) { return this.backingConfig.keySet(); } final HashSet<String> set = new HashSet<>(); int prefixLen = this.prefix.length(); for (String key : this.backingConfig.keySet()) { if (key.startsWith(prefix)) { set.a...
DelegatingConfiguration extends Configuration { @Override public Set<String> keySet() { if (this.prefix == null) { return this.backingConfig.keySet(); } final HashSet<String> set = new HashSet<>(); int prefixLen = this.prefix.length(); for (String key : this.backingConfig.keySet()) { if (key.startsWith(prefix)) { set.a...
DelegatingConfiguration extends Configuration { @Override public Set<String> keySet() { if (this.prefix == null) { return this.backingConfig.keySet(); } final HashSet<String> set = new HashSet<>(); int prefixLen = this.prefix.length(); for (String key : this.backingConfig.keySet()) { if (key.startsWith(prefix)) { set.a...
DelegatingConfiguration extends Configuration { @Override public Set<String> keySet() { if (this.prefix == null) { return this.backingConfig.keySet(); } final HashSet<String> set = new HashSet<>(); int prefixLen = this.prefix.length(); for (String key : this.backingConfig.keySet()) { if (key.startsWith(prefix)) { set.a...
@Test public void testCheckpointing() throws Exception { source.autoAck = false; StreamSource<String, RMQSource<String>> src = new StreamSource<>(source); AbstractStreamOperatorTestHarness<String> testHarness = new AbstractStreamOperatorTestHarness<>(src, 1, 1, 0); testHarness.open(); sourceThread.start(); Thread.sleep...
@Override public void open(Configuration config) throws Exception { super.open(config); ConnectionFactory factory = setupConnectionFactory(); try { connection = factory.newConnection(); channel = connection.createChannel(); if (channel == null) { throw new RuntimeException("None of RabbitMQ channels are available"); } ...
RMQSource extends MultipleIdsMessageAcknowledgingSourceBase<OUT, String, Long> implements ResultTypeQueryable<OUT> { @Override public void open(Configuration config) throws Exception { super.open(config); ConnectionFactory factory = setupConnectionFactory(); try { connection = factory.newConnection(); channel = connect...
RMQSource extends MultipleIdsMessageAcknowledgingSourceBase<OUT, String, Long> implements ResultTypeQueryable<OUT> { @Override public void open(Configuration config) throws Exception { super.open(config); ConnectionFactory factory = setupConnectionFactory(); try { connection = factory.newConnection(); channel = connect...
RMQSource extends MultipleIdsMessageAcknowledgingSourceBase<OUT, String, Long> implements ResultTypeQueryable<OUT> { @Override public void open(Configuration config) throws Exception { super.open(config); ConnectionFactory factory = setupConnectionFactory(); try { connection = factory.newConnection(); channel = connect...
RMQSource extends MultipleIdsMessageAcknowledgingSourceBase<OUT, String, Long> implements ResultTypeQueryable<OUT> { @Override public void open(Configuration config) throws Exception { super.open(config); ConnectionFactory factory = setupConnectionFactory(); try { connection = factory.newConnection(); channel = connect...
@Test public void testDelegationConfigurationWithPrefix() { String prefix = "pref-"; String expectedKey = "key"; Configuration backingConf = new Configuration(); backingConf.setValueInternal(prefix + expectedKey, "value"); DelegatingConfiguration configuration = new DelegatingConfiguration(backingConf, prefix); Set<Str...
@Override public Set<String> keySet() { if (this.prefix == null) { return this.backingConfig.keySet(); } final HashSet<String> set = new HashSet<>(); int prefixLen = this.prefix.length(); for (String key : this.backingConfig.keySet()) { if (key.startsWith(prefix)) { set.add(key.substring(prefixLen)); } } return set; }
DelegatingConfiguration extends Configuration { @Override public Set<String> keySet() { if (this.prefix == null) { return this.backingConfig.keySet(); } final HashSet<String> set = new HashSet<>(); int prefixLen = this.prefix.length(); for (String key : this.backingConfig.keySet()) { if (key.startsWith(prefix)) { set.a...
DelegatingConfiguration extends Configuration { @Override public Set<String> keySet() { if (this.prefix == null) { return this.backingConfig.keySet(); } final HashSet<String> set = new HashSet<>(); int prefixLen = this.prefix.length(); for (String key : this.backingConfig.keySet()) { if (key.startsWith(prefix)) { set.a...
DelegatingConfiguration extends Configuration { @Override public Set<String> keySet() { if (this.prefix == null) { return this.backingConfig.keySet(); } final HashSet<String> set = new HashSet<>(); int prefixLen = this.prefix.length(); for (String key : this.backingConfig.keySet()) { if (key.startsWith(prefix)) { set.a...
DelegatingConfiguration extends Configuration { @Override public Set<String> keySet() { if (this.prefix == null) { return this.backingConfig.keySet(); } final HashSet<String> set = new HashSet<>(); int prefixLen = this.prefix.length(); for (String key : this.backingConfig.keySet()) { if (key.startsWith(prefix)) { set.a...
@Test public void testGetParentFirstLoaderPatterns() { Configuration config = new Configuration(); Assert.assertArrayEquals( CoreOptions.ALWAYS_PARENT_FIRST_LOADER_PATTERNS.defaultValue().split(";"), CoreOptions.getParentFirstLoaderPatterns(config)); config.setString(CoreOptions.ALWAYS_PARENT_FIRST_LOADER_PATTERNS, "he...
public static String[] getParentFirstLoaderPatterns(Configuration config) { String base = config.getString(ALWAYS_PARENT_FIRST_LOADER_PATTERNS); String append = config.getString(ALWAYS_PARENT_FIRST_LOADER_PATTERNS_ADDITIONAL); String[] basePatterns = base.isEmpty() ? new String[0] : base.split(";"); if (append.isEmpty(...
CoreOptions { public static String[] getParentFirstLoaderPatterns(Configuration config) { String base = config.getString(ALWAYS_PARENT_FIRST_LOADER_PATTERNS); String append = config.getString(ALWAYS_PARENT_FIRST_LOADER_PATTERNS_ADDITIONAL); String[] basePatterns = base.isEmpty() ? new String[0] : base.split(";"); if (a...
CoreOptions { public static String[] getParentFirstLoaderPatterns(Configuration config) { String base = config.getString(ALWAYS_PARENT_FIRST_LOADER_PATTERNS); String append = config.getString(ALWAYS_PARENT_FIRST_LOADER_PATTERNS_ADDITIONAL); String[] basePatterns = base.isEmpty() ? new String[0] : base.split(";"); if (a...
CoreOptions { public static String[] getParentFirstLoaderPatterns(Configuration config) { String base = config.getString(ALWAYS_PARENT_FIRST_LOADER_PATTERNS); String append = config.getString(ALWAYS_PARENT_FIRST_LOADER_PATTERNS_ADDITIONAL); String[] basePatterns = base.isEmpty() ? new String[0] : base.split(";"); if (a...
CoreOptions { public static String[] getParentFirstLoaderPatterns(Configuration config) { String base = config.getString(ALWAYS_PARENT_FIRST_LOADER_PATTERNS); String append = config.getString(ALWAYS_PARENT_FIRST_LOADER_PATTERNS_ADDITIONAL); String[] basePatterns = base.isEmpty() ? new String[0] : base.split(";"); if (a...
@Test public void testUnparsableLongForProducerConfiguration() { exception.expect(IllegalArgumentException.class); exception.expectMessage("Error trying to set field RateLimit with the value 'unparsableLong'"); Properties testConfig = new Properties(); testConfig.setProperty(AWSConfigConstants.AWS_REGION, "us-east-1");...
public static KinesisProducerConfiguration getValidatedProducerConfiguration(Properties config) { checkNotNull(config, "config can not be null"); validateAwsConfiguration(config); KinesisProducerConfiguration kpc = KinesisProducerConfiguration.fromProperties(config); kpc.setRegion(config.getProperty(AWSConfigConstants....
KinesisConfigUtil { public static KinesisProducerConfiguration getValidatedProducerConfiguration(Properties config) { checkNotNull(config, "config can not be null"); validateAwsConfiguration(config); KinesisProducerConfiguration kpc = KinesisProducerConfiguration.fromProperties(config); kpc.setRegion(config.getProperty...
KinesisConfigUtil { public static KinesisProducerConfiguration getValidatedProducerConfiguration(Properties config) { checkNotNull(config, "config can not be null"); validateAwsConfiguration(config); KinesisProducerConfiguration kpc = KinesisProducerConfiguration.fromProperties(config); kpc.setRegion(config.getProperty...
KinesisConfigUtil { public static KinesisProducerConfiguration getValidatedProducerConfiguration(Properties config) { checkNotNull(config, "config can not be null"); validateAwsConfiguration(config); KinesisProducerConfiguration kpc = KinesisProducerConfiguration.fromProperties(config); kpc.setRegion(config.getProperty...
KinesisConfigUtil { public static KinesisProducerConfiguration getValidatedProducerConfiguration(Properties config) { checkNotNull(config, "config can not be null"); validateAwsConfiguration(config); KinesisProducerConfiguration kpc = KinesisProducerConfiguration.fromProperties(config); kpc.setRegion(config.getProperty...
@Test public void testRateLimitInProducerConfiguration() { Properties testConfig = new Properties(); testConfig.setProperty(AWSConfigConstants.AWS_REGION, "us-east-1"); KinesisProducerConfiguration kpc = KinesisConfigUtil.getValidatedProducerConfiguration(testConfig); assertEquals(100, kpc.getRateLimit()); testConfig.s...
public static KinesisProducerConfiguration getValidatedProducerConfiguration(Properties config) { checkNotNull(config, "config can not be null"); validateAwsConfiguration(config); KinesisProducerConfiguration kpc = KinesisProducerConfiguration.fromProperties(config); kpc.setRegion(config.getProperty(AWSConfigConstants....
KinesisConfigUtil { public static KinesisProducerConfiguration getValidatedProducerConfiguration(Properties config) { checkNotNull(config, "config can not be null"); validateAwsConfiguration(config); KinesisProducerConfiguration kpc = KinesisProducerConfiguration.fromProperties(config); kpc.setRegion(config.getProperty...
KinesisConfigUtil { public static KinesisProducerConfiguration getValidatedProducerConfiguration(Properties config) { checkNotNull(config, "config can not be null"); validateAwsConfiguration(config); KinesisProducerConfiguration kpc = KinesisProducerConfiguration.fromProperties(config); kpc.setRegion(config.getProperty...
KinesisConfigUtil { public static KinesisProducerConfiguration getValidatedProducerConfiguration(Properties config) { checkNotNull(config, "config can not be null"); validateAwsConfiguration(config); KinesisProducerConfiguration kpc = KinesisProducerConfiguration.fromProperties(config); kpc.setRegion(config.getProperty...
KinesisConfigUtil { public static KinesisProducerConfiguration getValidatedProducerConfiguration(Properties config) { checkNotNull(config, "config can not be null"); validateAwsConfiguration(config); KinesisProducerConfiguration kpc = KinesisProducerConfiguration.fromProperties(config); kpc.setRegion(config.getProperty...
@Test public void testConfigurationYAML() { File tmpDir = tempFolder.getRoot(); File confFile = new File(tmpDir, GlobalConfiguration.FLINK_CONF_FILENAME); try { try (final PrintWriter pw = new PrintWriter(confFile)) { pw.println("###########################"); pw.println("# Some : comments : to skip"); pw.println("####...
public static Configuration loadConfiguration() { final String configDir = System.getenv(ConfigConstants.ENV_FLINK_CONF_DIR); if (configDir == null) { return new Configuration(); } return loadConfiguration(configDir, null); }
GlobalConfiguration { public static Configuration loadConfiguration() { final String configDir = System.getenv(ConfigConstants.ENV_FLINK_CONF_DIR); if (configDir == null) { return new Configuration(); } return loadConfiguration(configDir, null); } }
GlobalConfiguration { public static Configuration loadConfiguration() { final String configDir = System.getenv(ConfigConstants.ENV_FLINK_CONF_DIR); if (configDir == null) { return new Configuration(); } return loadConfiguration(configDir, null); } private GlobalConfiguration(); }
GlobalConfiguration { public static Configuration loadConfiguration() { final String configDir = System.getenv(ConfigConstants.ENV_FLINK_CONF_DIR); if (configDir == null) { return new Configuration(); } return loadConfiguration(configDir, null); } private GlobalConfiguration(); static Configuration loadConfiguration()...
GlobalConfiguration { public static Configuration loadConfiguration() { final String configDir = System.getenv(ConfigConstants.ENV_FLINK_CONF_DIR); if (configDir == null) { return new Configuration(); } return loadConfiguration(configDir, null); } private GlobalConfiguration(); static Configuration loadConfiguration()...
@Test public void testThreadingModelInProducerConfiguration() { Properties testConfig = new Properties(); testConfig.setProperty(AWSConfigConstants.AWS_REGION, "us-east-1"); KinesisProducerConfiguration kpc = KinesisConfigUtil.getValidatedProducerConfiguration(testConfig); assertEquals(KinesisProducerConfiguration.Thre...
public static KinesisProducerConfiguration getValidatedProducerConfiguration(Properties config) { checkNotNull(config, "config can not be null"); validateAwsConfiguration(config); KinesisProducerConfiguration kpc = KinesisProducerConfiguration.fromProperties(config); kpc.setRegion(config.getProperty(AWSConfigConstants....
KinesisConfigUtil { public static KinesisProducerConfiguration getValidatedProducerConfiguration(Properties config) { checkNotNull(config, "config can not be null"); validateAwsConfiguration(config); KinesisProducerConfiguration kpc = KinesisProducerConfiguration.fromProperties(config); kpc.setRegion(config.getProperty...
KinesisConfigUtil { public static KinesisProducerConfiguration getValidatedProducerConfiguration(Properties config) { checkNotNull(config, "config can not be null"); validateAwsConfiguration(config); KinesisProducerConfiguration kpc = KinesisProducerConfiguration.fromProperties(config); kpc.setRegion(config.getProperty...
KinesisConfigUtil { public static KinesisProducerConfiguration getValidatedProducerConfiguration(Properties config) { checkNotNull(config, "config can not be null"); validateAwsConfiguration(config); KinesisProducerConfiguration kpc = KinesisProducerConfiguration.fromProperties(config); kpc.setRegion(config.getProperty...
KinesisConfigUtil { public static KinesisProducerConfiguration getValidatedProducerConfiguration(Properties config) { checkNotNull(config, "config can not be null"); validateAwsConfiguration(config); KinesisProducerConfiguration kpc = KinesisProducerConfiguration.fromProperties(config); kpc.setRegion(config.getProperty...
@Test public void testThreadPoolSizeInProducerConfiguration() { Properties testConfig = new Properties(); testConfig.setProperty(AWSConfigConstants.AWS_REGION, "us-east-1"); KinesisProducerConfiguration kpc = KinesisConfigUtil.getValidatedProducerConfiguration(testConfig); assertEquals(10, kpc.getThreadPoolSize()); tes...
public static KinesisProducerConfiguration getValidatedProducerConfiguration(Properties config) { checkNotNull(config, "config can not be null"); validateAwsConfiguration(config); KinesisProducerConfiguration kpc = KinesisProducerConfiguration.fromProperties(config); kpc.setRegion(config.getProperty(AWSConfigConstants....
KinesisConfigUtil { public static KinesisProducerConfiguration getValidatedProducerConfiguration(Properties config) { checkNotNull(config, "config can not be null"); validateAwsConfiguration(config); KinesisProducerConfiguration kpc = KinesisProducerConfiguration.fromProperties(config); kpc.setRegion(config.getProperty...
KinesisConfigUtil { public static KinesisProducerConfiguration getValidatedProducerConfiguration(Properties config) { checkNotNull(config, "config can not be null"); validateAwsConfiguration(config); KinesisProducerConfiguration kpc = KinesisProducerConfiguration.fromProperties(config); kpc.setRegion(config.getProperty...
KinesisConfigUtil { public static KinesisProducerConfiguration getValidatedProducerConfiguration(Properties config) { checkNotNull(config, "config can not be null"); validateAwsConfiguration(config); KinesisProducerConfiguration kpc = KinesisProducerConfiguration.fromProperties(config); kpc.setRegion(config.getProperty...
KinesisConfigUtil { public static KinesisProducerConfiguration getValidatedProducerConfiguration(Properties config) { checkNotNull(config, "config can not be null"); validateAwsConfiguration(config); KinesisProducerConfiguration kpc = KinesisProducerConfiguration.fromProperties(config); kpc.setRegion(config.getProperty...
@Test public void testCorrectlySetRegionInProducerConfiguration() { String region = "us-east-1"; Properties testConfig = new Properties(); testConfig.setProperty(AWSConfigConstants.AWS_REGION, region); KinesisProducerConfiguration kpc = KinesisConfigUtil.getValidatedProducerConfiguration(testConfig); assertEquals("inco...
public static KinesisProducerConfiguration getValidatedProducerConfiguration(Properties config) { checkNotNull(config, "config can not be null"); validateAwsConfiguration(config); KinesisProducerConfiguration kpc = KinesisProducerConfiguration.fromProperties(config); kpc.setRegion(config.getProperty(AWSConfigConstants....
KinesisConfigUtil { public static KinesisProducerConfiguration getValidatedProducerConfiguration(Properties config) { checkNotNull(config, "config can not be null"); validateAwsConfiguration(config); KinesisProducerConfiguration kpc = KinesisProducerConfiguration.fromProperties(config); kpc.setRegion(config.getProperty...
KinesisConfigUtil { public static KinesisProducerConfiguration getValidatedProducerConfiguration(Properties config) { checkNotNull(config, "config can not be null"); validateAwsConfiguration(config); KinesisProducerConfiguration kpc = KinesisProducerConfiguration.fromProperties(config); kpc.setRegion(config.getProperty...
KinesisConfigUtil { public static KinesisProducerConfiguration getValidatedProducerConfiguration(Properties config) { checkNotNull(config, "config can not be null"); validateAwsConfiguration(config); KinesisProducerConfiguration kpc = KinesisProducerConfiguration.fromProperties(config); kpc.setRegion(config.getProperty...
KinesisConfigUtil { public static KinesisProducerConfiguration getValidatedProducerConfiguration(Properties config) { checkNotNull(config, "config can not be null"); validateAwsConfiguration(config); KinesisProducerConfiguration kpc = KinesisProducerConfiguration.fromProperties(config); kpc.setRegion(config.getProperty...
@Test public void testUnrecognizableCredentialProviderTypeInConfig() { exception.expect(IllegalArgumentException.class); exception.expectMessage("Invalid AWS Credential Provider Type"); Properties testConfig = TestUtils.getStandardProperties(); testConfig.setProperty(AWSConfigConstants.AWS_CREDENTIALS_PROVIDER, "wrongP...
public static void validateAwsConfiguration(Properties config) { if (config.containsKey(AWSConfigConstants.AWS_CREDENTIALS_PROVIDER)) { String credentialsProviderType = config.getProperty(AWSConfigConstants.AWS_CREDENTIALS_PROVIDER); CredentialProvider providerType; try { providerType = CredentialProvider.valueOf(crede...
KinesisConfigUtil { public static void validateAwsConfiguration(Properties config) { if (config.containsKey(AWSConfigConstants.AWS_CREDENTIALS_PROVIDER)) { String credentialsProviderType = config.getProperty(AWSConfigConstants.AWS_CREDENTIALS_PROVIDER); CredentialProvider providerType; try { providerType = CredentialPr...
KinesisConfigUtil { public static void validateAwsConfiguration(Properties config) { if (config.containsKey(AWSConfigConstants.AWS_CREDENTIALS_PROVIDER)) { String credentialsProviderType = config.getProperty(AWSConfigConstants.AWS_CREDENTIALS_PROVIDER); CredentialProvider providerType; try { providerType = CredentialPr...
KinesisConfigUtil { public static void validateAwsConfiguration(Properties config) { if (config.containsKey(AWSConfigConstants.AWS_CREDENTIALS_PROVIDER)) { String credentialsProviderType = config.getProperty(AWSConfigConstants.AWS_CREDENTIALS_PROVIDER); CredentialProvider providerType; try { providerType = CredentialPr...
KinesisConfigUtil { public static void validateAwsConfiguration(Properties config) { if (config.containsKey(AWSConfigConstants.AWS_CREDENTIALS_PROVIDER)) { String credentialsProviderType = config.getProperty(AWSConfigConstants.AWS_CREDENTIALS_PROVIDER); CredentialProvider providerType; try { providerType = CredentialPr...
@Test public void testUnrecognizableStreamInitPositionTypeInConfig() { exception.expect(IllegalArgumentException.class); exception.expectMessage("Invalid initial position in stream"); Properties testConfig = TestUtils.getStandardProperties(); testConfig.setProperty(ConsumerConfigConstants.AWS_CREDENTIALS_PROVIDER, "BAS...
public static void validateConsumerConfiguration(Properties config) { checkNotNull(config, "config can not be null"); validateAwsConfiguration(config); if (config.containsKey(ConsumerConfigConstants.STREAM_INITIAL_POSITION)) { String initPosType = config.getProperty(ConsumerConfigConstants.STREAM_INITIAL_POSITION); try...
KinesisConfigUtil { public static void validateConsumerConfiguration(Properties config) { checkNotNull(config, "config can not be null"); validateAwsConfiguration(config); if (config.containsKey(ConsumerConfigConstants.STREAM_INITIAL_POSITION)) { String initPosType = config.getProperty(ConsumerConfigConstants.STREAM_IN...
KinesisConfigUtil { public static void validateConsumerConfiguration(Properties config) { checkNotNull(config, "config can not be null"); validateAwsConfiguration(config); if (config.containsKey(ConsumerConfigConstants.STREAM_INITIAL_POSITION)) { String initPosType = config.getProperty(ConsumerConfigConstants.STREAM_IN...
KinesisConfigUtil { public static void validateConsumerConfiguration(Properties config) { checkNotNull(config, "config can not be null"); validateAwsConfiguration(config); if (config.containsKey(ConsumerConfigConstants.STREAM_INITIAL_POSITION)) { String initPosType = config.getProperty(ConsumerConfigConstants.STREAM_IN...
KinesisConfigUtil { public static void validateConsumerConfiguration(Properties config) { checkNotNull(config, "config can not be null"); validateAwsConfiguration(config); if (config.containsKey(ConsumerConfigConstants.STREAM_INITIAL_POSITION)) { String initPosType = config.getProperty(ConsumerConfigConstants.STREAM_IN...
@Test public void testStreamInitPositionTypeSetToAtTimestampButNoInitTimestampSetInConfig() { exception.expect(IllegalArgumentException.class); exception.expectMessage("Please set value for initial timestamp ('" + ConsumerConfigConstants.STREAM_INITIAL_TIMESTAMP + "') when using AT_TIMESTAMP initial position."); Proper...
public static void validateConsumerConfiguration(Properties config) { checkNotNull(config, "config can not be null"); validateAwsConfiguration(config); if (config.containsKey(ConsumerConfigConstants.STREAM_INITIAL_POSITION)) { String initPosType = config.getProperty(ConsumerConfigConstants.STREAM_INITIAL_POSITION); try...
KinesisConfigUtil { public static void validateConsumerConfiguration(Properties config) { checkNotNull(config, "config can not be null"); validateAwsConfiguration(config); if (config.containsKey(ConsumerConfigConstants.STREAM_INITIAL_POSITION)) { String initPosType = config.getProperty(ConsumerConfigConstants.STREAM_IN...
KinesisConfigUtil { public static void validateConsumerConfiguration(Properties config) { checkNotNull(config, "config can not be null"); validateAwsConfiguration(config); if (config.containsKey(ConsumerConfigConstants.STREAM_INITIAL_POSITION)) { String initPosType = config.getProperty(ConsumerConfigConstants.STREAM_IN...
KinesisConfigUtil { public static void validateConsumerConfiguration(Properties config) { checkNotNull(config, "config can not be null"); validateAwsConfiguration(config); if (config.containsKey(ConsumerConfigConstants.STREAM_INITIAL_POSITION)) { String initPosType = config.getProperty(ConsumerConfigConstants.STREAM_IN...
KinesisConfigUtil { public static void validateConsumerConfiguration(Properties config) { checkNotNull(config, "config can not be null"); validateAwsConfiguration(config); if (config.containsKey(ConsumerConfigConstants.STREAM_INITIAL_POSITION)) { String initPosType = config.getProperty(ConsumerConfigConstants.STREAM_IN...
@Test(expected = IllegalArgumentException.class) public void testFailIfNull() { GlobalConfiguration.loadConfiguration(null); }
public static Configuration loadConfiguration() { final String configDir = System.getenv(ConfigConstants.ENV_FLINK_CONF_DIR); if (configDir == null) { return new Configuration(); } return loadConfiguration(configDir, null); }
GlobalConfiguration { public static Configuration loadConfiguration() { final String configDir = System.getenv(ConfigConstants.ENV_FLINK_CONF_DIR); if (configDir == null) { return new Configuration(); } return loadConfiguration(configDir, null); } }
GlobalConfiguration { public static Configuration loadConfiguration() { final String configDir = System.getenv(ConfigConstants.ENV_FLINK_CONF_DIR); if (configDir == null) { return new Configuration(); } return loadConfiguration(configDir, null); } private GlobalConfiguration(); }
GlobalConfiguration { public static Configuration loadConfiguration() { final String configDir = System.getenv(ConfigConstants.ENV_FLINK_CONF_DIR); if (configDir == null) { return new Configuration(); } return loadConfiguration(configDir, null); } private GlobalConfiguration(); static Configuration loadConfiguration()...
GlobalConfiguration { public static Configuration loadConfiguration() { final String configDir = System.getenv(ConfigConstants.ENV_FLINK_CONF_DIR); if (configDir == null) { return new Configuration(); } return loadConfiguration(configDir, null); } private GlobalConfiguration(); static Configuration loadConfiguration()...
@Test public void testUnparsableDateForInitialTimestampInConfig() { exception.expect(IllegalArgumentException.class); exception.expectMessage("Invalid value given for initial timestamp for AT_TIMESTAMP initial position in stream."); Properties testConfig = TestUtils.getStandardProperties(); testConfig.setProperty(Consu...
public static void validateConsumerConfiguration(Properties config) { checkNotNull(config, "config can not be null"); validateAwsConfiguration(config); if (config.containsKey(ConsumerConfigConstants.STREAM_INITIAL_POSITION)) { String initPosType = config.getProperty(ConsumerConfigConstants.STREAM_INITIAL_POSITION); try...
KinesisConfigUtil { public static void validateConsumerConfiguration(Properties config) { checkNotNull(config, "config can not be null"); validateAwsConfiguration(config); if (config.containsKey(ConsumerConfigConstants.STREAM_INITIAL_POSITION)) { String initPosType = config.getProperty(ConsumerConfigConstants.STREAM_IN...
KinesisConfigUtil { public static void validateConsumerConfiguration(Properties config) { checkNotNull(config, "config can not be null"); validateAwsConfiguration(config); if (config.containsKey(ConsumerConfigConstants.STREAM_INITIAL_POSITION)) { String initPosType = config.getProperty(ConsumerConfigConstants.STREAM_IN...
KinesisConfigUtil { public static void validateConsumerConfiguration(Properties config) { checkNotNull(config, "config can not be null"); validateAwsConfiguration(config); if (config.containsKey(ConsumerConfigConstants.STREAM_INITIAL_POSITION)) { String initPosType = config.getProperty(ConsumerConfigConstants.STREAM_IN...
KinesisConfigUtil { public static void validateConsumerConfiguration(Properties config) { checkNotNull(config, "config can not be null"); validateAwsConfiguration(config); if (config.containsKey(ConsumerConfigConstants.STREAM_INITIAL_POSITION)) { String initPosType = config.getProperty(ConsumerConfigConstants.STREAM_IN...
@Test public void testIllegalValueForInitialTimestampInConfig() { exception.expect(IllegalArgumentException.class); exception.expectMessage("Invalid value given for initial timestamp for AT_TIMESTAMP initial position in stream."); Properties testConfig = TestUtils.getStandardProperties(); testConfig.setProperty(Consume...
public static void validateConsumerConfiguration(Properties config) { checkNotNull(config, "config can not be null"); validateAwsConfiguration(config); if (config.containsKey(ConsumerConfigConstants.STREAM_INITIAL_POSITION)) { String initPosType = config.getProperty(ConsumerConfigConstants.STREAM_INITIAL_POSITION); try...
KinesisConfigUtil { public static void validateConsumerConfiguration(Properties config) { checkNotNull(config, "config can not be null"); validateAwsConfiguration(config); if (config.containsKey(ConsumerConfigConstants.STREAM_INITIAL_POSITION)) { String initPosType = config.getProperty(ConsumerConfigConstants.STREAM_IN...
KinesisConfigUtil { public static void validateConsumerConfiguration(Properties config) { checkNotNull(config, "config can not be null"); validateAwsConfiguration(config); if (config.containsKey(ConsumerConfigConstants.STREAM_INITIAL_POSITION)) { String initPosType = config.getProperty(ConsumerConfigConstants.STREAM_IN...
KinesisConfigUtil { public static void validateConsumerConfiguration(Properties config) { checkNotNull(config, "config can not be null"); validateAwsConfiguration(config); if (config.containsKey(ConsumerConfigConstants.STREAM_INITIAL_POSITION)) { String initPosType = config.getProperty(ConsumerConfigConstants.STREAM_IN...
KinesisConfigUtil { public static void validateConsumerConfiguration(Properties config) { checkNotNull(config, "config can not be null"); validateAwsConfiguration(config); if (config.containsKey(ConsumerConfigConstants.STREAM_INITIAL_POSITION)) { String initPosType = config.getProperty(ConsumerConfigConstants.STREAM_IN...
@Test public void testDateStringForValidateOptionDateProperty() { String timestamp = "2016-04-04T19:58:46.480-00:00"; Properties testConfig = TestUtils.getStandardProperties(); testConfig.setProperty(ConsumerConfigConstants.AWS_CREDENTIALS_PROVIDER, "BASIC"); testConfig.setProperty(ConsumerConfigConstants.STREAM_INITIA...
public static void validateConsumerConfiguration(Properties config) { checkNotNull(config, "config can not be null"); validateAwsConfiguration(config); if (config.containsKey(ConsumerConfigConstants.STREAM_INITIAL_POSITION)) { String initPosType = config.getProperty(ConsumerConfigConstants.STREAM_INITIAL_POSITION); try...
KinesisConfigUtil { public static void validateConsumerConfiguration(Properties config) { checkNotNull(config, "config can not be null"); validateAwsConfiguration(config); if (config.containsKey(ConsumerConfigConstants.STREAM_INITIAL_POSITION)) { String initPosType = config.getProperty(ConsumerConfigConstants.STREAM_IN...
KinesisConfigUtil { public static void validateConsumerConfiguration(Properties config) { checkNotNull(config, "config can not be null"); validateAwsConfiguration(config); if (config.containsKey(ConsumerConfigConstants.STREAM_INITIAL_POSITION)) { String initPosType = config.getProperty(ConsumerConfigConstants.STREAM_IN...
KinesisConfigUtil { public static void validateConsumerConfiguration(Properties config) { checkNotNull(config, "config can not be null"); validateAwsConfiguration(config); if (config.containsKey(ConsumerConfigConstants.STREAM_INITIAL_POSITION)) { String initPosType = config.getProperty(ConsumerConfigConstants.STREAM_IN...
KinesisConfigUtil { public static void validateConsumerConfiguration(Properties config) { checkNotNull(config, "config can not be null"); validateAwsConfiguration(config); if (config.containsKey(ConsumerConfigConstants.STREAM_INITIAL_POSITION)) { String initPosType = config.getProperty(ConsumerConfigConstants.STREAM_IN...
@Test public void testUnixTimestampForValidateOptionDateProperty() { String unixTimestamp = "1459799926.480"; Properties testConfig = TestUtils.getStandardProperties(); testConfig.setProperty(ConsumerConfigConstants.AWS_CREDENTIALS_PROVIDER, "BASIC"); testConfig.setProperty(ConsumerConfigConstants.STREAM_INITIAL_POSITI...
public static void validateConsumerConfiguration(Properties config) { checkNotNull(config, "config can not be null"); validateAwsConfiguration(config); if (config.containsKey(ConsumerConfigConstants.STREAM_INITIAL_POSITION)) { String initPosType = config.getProperty(ConsumerConfigConstants.STREAM_INITIAL_POSITION); try...
KinesisConfigUtil { public static void validateConsumerConfiguration(Properties config) { checkNotNull(config, "config can not be null"); validateAwsConfiguration(config); if (config.containsKey(ConsumerConfigConstants.STREAM_INITIAL_POSITION)) { String initPosType = config.getProperty(ConsumerConfigConstants.STREAM_IN...
KinesisConfigUtil { public static void validateConsumerConfiguration(Properties config) { checkNotNull(config, "config can not be null"); validateAwsConfiguration(config); if (config.containsKey(ConsumerConfigConstants.STREAM_INITIAL_POSITION)) { String initPosType = config.getProperty(ConsumerConfigConstants.STREAM_IN...
KinesisConfigUtil { public static void validateConsumerConfiguration(Properties config) { checkNotNull(config, "config can not be null"); validateAwsConfiguration(config); if (config.containsKey(ConsumerConfigConstants.STREAM_INITIAL_POSITION)) { String initPosType = config.getProperty(ConsumerConfigConstants.STREAM_IN...
KinesisConfigUtil { public static void validateConsumerConfiguration(Properties config) { checkNotNull(config, "config can not be null"); validateAwsConfiguration(config); if (config.containsKey(ConsumerConfigConstants.STREAM_INITIAL_POSITION)) { String initPosType = config.getProperty(ConsumerConfigConstants.STREAM_IN...
@Test public void testInvalidPatternForInitialTimestampInConfig() { exception.expect(IllegalArgumentException.class); exception.expectMessage("Invalid value given for initial timestamp for AT_TIMESTAMP initial position in stream."); Properties testConfig = TestUtils.getStandardProperties(); testConfig.setProperty(Consu...
public static void validateConsumerConfiguration(Properties config) { checkNotNull(config, "config can not be null"); validateAwsConfiguration(config); if (config.containsKey(ConsumerConfigConstants.STREAM_INITIAL_POSITION)) { String initPosType = config.getProperty(ConsumerConfigConstants.STREAM_INITIAL_POSITION); try...
KinesisConfigUtil { public static void validateConsumerConfiguration(Properties config) { checkNotNull(config, "config can not be null"); validateAwsConfiguration(config); if (config.containsKey(ConsumerConfigConstants.STREAM_INITIAL_POSITION)) { String initPosType = config.getProperty(ConsumerConfigConstants.STREAM_IN...
KinesisConfigUtil { public static void validateConsumerConfiguration(Properties config) { checkNotNull(config, "config can not be null"); validateAwsConfiguration(config); if (config.containsKey(ConsumerConfigConstants.STREAM_INITIAL_POSITION)) { String initPosType = config.getProperty(ConsumerConfigConstants.STREAM_IN...
KinesisConfigUtil { public static void validateConsumerConfiguration(Properties config) { checkNotNull(config, "config can not be null"); validateAwsConfiguration(config); if (config.containsKey(ConsumerConfigConstants.STREAM_INITIAL_POSITION)) { String initPosType = config.getProperty(ConsumerConfigConstants.STREAM_IN...
KinesisConfigUtil { public static void validateConsumerConfiguration(Properties config) { checkNotNull(config, "config can not be null"); validateAwsConfiguration(config); if (config.containsKey(ConsumerConfigConstants.STREAM_INITIAL_POSITION)) { String initPosType = config.getProperty(ConsumerConfigConstants.STREAM_IN...
@Test public void testUnparsableDateForUserDefinedDateFormatForInitialTimestampInConfig() { exception.expect(IllegalArgumentException.class); exception.expectMessage("Invalid value given for initial timestamp for AT_TIMESTAMP initial position in stream."); Properties testConfig = TestUtils.getStandardProperties(); test...
public static void validateConsumerConfiguration(Properties config) { checkNotNull(config, "config can not be null"); validateAwsConfiguration(config); if (config.containsKey(ConsumerConfigConstants.STREAM_INITIAL_POSITION)) { String initPosType = config.getProperty(ConsumerConfigConstants.STREAM_INITIAL_POSITION); try...
KinesisConfigUtil { public static void validateConsumerConfiguration(Properties config) { checkNotNull(config, "config can not be null"); validateAwsConfiguration(config); if (config.containsKey(ConsumerConfigConstants.STREAM_INITIAL_POSITION)) { String initPosType = config.getProperty(ConsumerConfigConstants.STREAM_IN...
KinesisConfigUtil { public static void validateConsumerConfiguration(Properties config) { checkNotNull(config, "config can not be null"); validateAwsConfiguration(config); if (config.containsKey(ConsumerConfigConstants.STREAM_INITIAL_POSITION)) { String initPosType = config.getProperty(ConsumerConfigConstants.STREAM_IN...
KinesisConfigUtil { public static void validateConsumerConfiguration(Properties config) { checkNotNull(config, "config can not be null"); validateAwsConfiguration(config); if (config.containsKey(ConsumerConfigConstants.STREAM_INITIAL_POSITION)) { String initPosType = config.getProperty(ConsumerConfigConstants.STREAM_IN...
KinesisConfigUtil { public static void validateConsumerConfiguration(Properties config) { checkNotNull(config, "config can not be null"); validateAwsConfiguration(config); if (config.containsKey(ConsumerConfigConstants.STREAM_INITIAL_POSITION)) { String initPosType = config.getProperty(ConsumerConfigConstants.STREAM_IN...
@Test public void testDateStringForUserDefinedDateFormatForValidateOptionDateProperty() { String unixTimestamp = "2016-04-04"; String pattern = "yyyy-MM-dd"; Properties testConfig = TestUtils.getStandardProperties(); testConfig.setProperty(ConsumerConfigConstants.AWS_CREDENTIALS_PROVIDER, "BASIC"); testConfig.setProper...
public static void validateConsumerConfiguration(Properties config) { checkNotNull(config, "config can not be null"); validateAwsConfiguration(config); if (config.containsKey(ConsumerConfigConstants.STREAM_INITIAL_POSITION)) { String initPosType = config.getProperty(ConsumerConfigConstants.STREAM_INITIAL_POSITION); try...
KinesisConfigUtil { public static void validateConsumerConfiguration(Properties config) { checkNotNull(config, "config can not be null"); validateAwsConfiguration(config); if (config.containsKey(ConsumerConfigConstants.STREAM_INITIAL_POSITION)) { String initPosType = config.getProperty(ConsumerConfigConstants.STREAM_IN...
KinesisConfigUtil { public static void validateConsumerConfiguration(Properties config) { checkNotNull(config, "config can not be null"); validateAwsConfiguration(config); if (config.containsKey(ConsumerConfigConstants.STREAM_INITIAL_POSITION)) { String initPosType = config.getProperty(ConsumerConfigConstants.STREAM_IN...
KinesisConfigUtil { public static void validateConsumerConfiguration(Properties config) { checkNotNull(config, "config can not be null"); validateAwsConfiguration(config); if (config.containsKey(ConsumerConfigConstants.STREAM_INITIAL_POSITION)) { String initPosType = config.getProperty(ConsumerConfigConstants.STREAM_IN...
KinesisConfigUtil { public static void validateConsumerConfiguration(Properties config) { checkNotNull(config, "config can not be null"); validateAwsConfiguration(config); if (config.containsKey(ConsumerConfigConstants.STREAM_INITIAL_POSITION)) { String initPosType = config.getProperty(ConsumerConfigConstants.STREAM_IN...
@Test public void testUnparsableLongForDescribeStreamBackoffBaseMillisInConfig() { exception.expect(IllegalArgumentException.class); exception.expectMessage("Invalid value given for describe stream operation base backoff milliseconds"); Properties testConfig = TestUtils.getStandardProperties(); testConfig.setProperty(C...
public static void validateConsumerConfiguration(Properties config) { checkNotNull(config, "config can not be null"); validateAwsConfiguration(config); if (config.containsKey(ConsumerConfigConstants.STREAM_INITIAL_POSITION)) { String initPosType = config.getProperty(ConsumerConfigConstants.STREAM_INITIAL_POSITION); try...
KinesisConfigUtil { public static void validateConsumerConfiguration(Properties config) { checkNotNull(config, "config can not be null"); validateAwsConfiguration(config); if (config.containsKey(ConsumerConfigConstants.STREAM_INITIAL_POSITION)) { String initPosType = config.getProperty(ConsumerConfigConstants.STREAM_IN...
KinesisConfigUtil { public static void validateConsumerConfiguration(Properties config) { checkNotNull(config, "config can not be null"); validateAwsConfiguration(config); if (config.containsKey(ConsumerConfigConstants.STREAM_INITIAL_POSITION)) { String initPosType = config.getProperty(ConsumerConfigConstants.STREAM_IN...
KinesisConfigUtil { public static void validateConsumerConfiguration(Properties config) { checkNotNull(config, "config can not be null"); validateAwsConfiguration(config); if (config.containsKey(ConsumerConfigConstants.STREAM_INITIAL_POSITION)) { String initPosType = config.getProperty(ConsumerConfigConstants.STREAM_IN...
KinesisConfigUtil { public static void validateConsumerConfiguration(Properties config) { checkNotNull(config, "config can not be null"); validateAwsConfiguration(config); if (config.containsKey(ConsumerConfigConstants.STREAM_INITIAL_POSITION)) { String initPosType = config.getProperty(ConsumerConfigConstants.STREAM_IN...
@Test public void testUnparsableLongForDescribeStreamBackoffMaxMillisInConfig() { exception.expect(IllegalArgumentException.class); exception.expectMessage("Invalid value given for describe stream operation max backoff milliseconds"); Properties testConfig = TestUtils.getStandardProperties(); testConfig.setProperty(Con...
public static void validateConsumerConfiguration(Properties config) { checkNotNull(config, "config can not be null"); validateAwsConfiguration(config); if (config.containsKey(ConsumerConfigConstants.STREAM_INITIAL_POSITION)) { String initPosType = config.getProperty(ConsumerConfigConstants.STREAM_INITIAL_POSITION); try...
KinesisConfigUtil { public static void validateConsumerConfiguration(Properties config) { checkNotNull(config, "config can not be null"); validateAwsConfiguration(config); if (config.containsKey(ConsumerConfigConstants.STREAM_INITIAL_POSITION)) { String initPosType = config.getProperty(ConsumerConfigConstants.STREAM_IN...
KinesisConfigUtil { public static void validateConsumerConfiguration(Properties config) { checkNotNull(config, "config can not be null"); validateAwsConfiguration(config); if (config.containsKey(ConsumerConfigConstants.STREAM_INITIAL_POSITION)) { String initPosType = config.getProperty(ConsumerConfigConstants.STREAM_IN...
KinesisConfigUtil { public static void validateConsumerConfiguration(Properties config) { checkNotNull(config, "config can not be null"); validateAwsConfiguration(config); if (config.containsKey(ConsumerConfigConstants.STREAM_INITIAL_POSITION)) { String initPosType = config.getProperty(ConsumerConfigConstants.STREAM_IN...
KinesisConfigUtil { public static void validateConsumerConfiguration(Properties config) { checkNotNull(config, "config can not be null"); validateAwsConfiguration(config); if (config.containsKey(ConsumerConfigConstants.STREAM_INITIAL_POSITION)) { String initPosType = config.getProperty(ConsumerConfigConstants.STREAM_IN...
@Test public void testUnparsableDoubleForDescribeStreamBackoffExponentialConstantInConfig() { exception.expect(IllegalArgumentException.class); exception.expectMessage("Invalid value given for describe stream operation backoff exponential constant"); Properties testConfig = TestUtils.getStandardProperties(); testConfig...
public static void validateConsumerConfiguration(Properties config) { checkNotNull(config, "config can not be null"); validateAwsConfiguration(config); if (config.containsKey(ConsumerConfigConstants.STREAM_INITIAL_POSITION)) { String initPosType = config.getProperty(ConsumerConfigConstants.STREAM_INITIAL_POSITION); try...
KinesisConfigUtil { public static void validateConsumerConfiguration(Properties config) { checkNotNull(config, "config can not be null"); validateAwsConfiguration(config); if (config.containsKey(ConsumerConfigConstants.STREAM_INITIAL_POSITION)) { String initPosType = config.getProperty(ConsumerConfigConstants.STREAM_IN...
KinesisConfigUtil { public static void validateConsumerConfiguration(Properties config) { checkNotNull(config, "config can not be null"); validateAwsConfiguration(config); if (config.containsKey(ConsumerConfigConstants.STREAM_INITIAL_POSITION)) { String initPosType = config.getProperty(ConsumerConfigConstants.STREAM_IN...
KinesisConfigUtil { public static void validateConsumerConfiguration(Properties config) { checkNotNull(config, "config can not be null"); validateAwsConfiguration(config); if (config.containsKey(ConsumerConfigConstants.STREAM_INITIAL_POSITION)) { String initPosType = config.getProperty(ConsumerConfigConstants.STREAM_IN...
KinesisConfigUtil { public static void validateConsumerConfiguration(Properties config) { checkNotNull(config, "config can not be null"); validateAwsConfiguration(config); if (config.containsKey(ConsumerConfigConstants.STREAM_INITIAL_POSITION)) { String initPosType = config.getProperty(ConsumerConfigConstants.STREAM_IN...
@Test(expected = IllegalConfigurationException.class) public void testFailIfNotLoaded() { GlobalConfiguration.loadConfiguration("/some/path/" + UUID.randomUUID()); }
public static Configuration loadConfiguration() { final String configDir = System.getenv(ConfigConstants.ENV_FLINK_CONF_DIR); if (configDir == null) { return new Configuration(); } return loadConfiguration(configDir, null); }
GlobalConfiguration { public static Configuration loadConfiguration() { final String configDir = System.getenv(ConfigConstants.ENV_FLINK_CONF_DIR); if (configDir == null) { return new Configuration(); } return loadConfiguration(configDir, null); } }
GlobalConfiguration { public static Configuration loadConfiguration() { final String configDir = System.getenv(ConfigConstants.ENV_FLINK_CONF_DIR); if (configDir == null) { return new Configuration(); } return loadConfiguration(configDir, null); } private GlobalConfiguration(); }
GlobalConfiguration { public static Configuration loadConfiguration() { final String configDir = System.getenv(ConfigConstants.ENV_FLINK_CONF_DIR); if (configDir == null) { return new Configuration(); } return loadConfiguration(configDir, null); } private GlobalConfiguration(); static Configuration loadConfiguration()...
GlobalConfiguration { public static Configuration loadConfiguration() { final String configDir = System.getenv(ConfigConstants.ENV_FLINK_CONF_DIR); if (configDir == null) { return new Configuration(); } return loadConfiguration(configDir, null); } private GlobalConfiguration(); static Configuration loadConfiguration()...
@Test public void testUnparsableIntForGetRecordsRetriesInConfig() { exception.expect(IllegalArgumentException.class); exception.expectMessage("Invalid value given for maximum retry attempts for getRecords shard operation"); Properties testConfig = TestUtils.getStandardProperties(); testConfig.setProperty(ConsumerConfig...
public static void validateConsumerConfiguration(Properties config) { checkNotNull(config, "config can not be null"); validateAwsConfiguration(config); if (config.containsKey(ConsumerConfigConstants.STREAM_INITIAL_POSITION)) { String initPosType = config.getProperty(ConsumerConfigConstants.STREAM_INITIAL_POSITION); try...
KinesisConfigUtil { public static void validateConsumerConfiguration(Properties config) { checkNotNull(config, "config can not be null"); validateAwsConfiguration(config); if (config.containsKey(ConsumerConfigConstants.STREAM_INITIAL_POSITION)) { String initPosType = config.getProperty(ConsumerConfigConstants.STREAM_IN...
KinesisConfigUtil { public static void validateConsumerConfiguration(Properties config) { checkNotNull(config, "config can not be null"); validateAwsConfiguration(config); if (config.containsKey(ConsumerConfigConstants.STREAM_INITIAL_POSITION)) { String initPosType = config.getProperty(ConsumerConfigConstants.STREAM_IN...
KinesisConfigUtil { public static void validateConsumerConfiguration(Properties config) { checkNotNull(config, "config can not be null"); validateAwsConfiguration(config); if (config.containsKey(ConsumerConfigConstants.STREAM_INITIAL_POSITION)) { String initPosType = config.getProperty(ConsumerConfigConstants.STREAM_IN...
KinesisConfigUtil { public static void validateConsumerConfiguration(Properties config) { checkNotNull(config, "config can not be null"); validateAwsConfiguration(config); if (config.containsKey(ConsumerConfigConstants.STREAM_INITIAL_POSITION)) { String initPosType = config.getProperty(ConsumerConfigConstants.STREAM_IN...
@Test public void testUnparsableIntForGetRecordsMaxCountInConfig() { exception.expect(IllegalArgumentException.class); exception.expectMessage("Invalid value given for maximum records per getRecords shard operation"); Properties testConfig = TestUtils.getStandardProperties(); testConfig.setProperty(ConsumerConfigConsta...
public static void validateConsumerConfiguration(Properties config) { checkNotNull(config, "config can not be null"); validateAwsConfiguration(config); if (config.containsKey(ConsumerConfigConstants.STREAM_INITIAL_POSITION)) { String initPosType = config.getProperty(ConsumerConfigConstants.STREAM_INITIAL_POSITION); try...
KinesisConfigUtil { public static void validateConsumerConfiguration(Properties config) { checkNotNull(config, "config can not be null"); validateAwsConfiguration(config); if (config.containsKey(ConsumerConfigConstants.STREAM_INITIAL_POSITION)) { String initPosType = config.getProperty(ConsumerConfigConstants.STREAM_IN...
KinesisConfigUtil { public static void validateConsumerConfiguration(Properties config) { checkNotNull(config, "config can not be null"); validateAwsConfiguration(config); if (config.containsKey(ConsumerConfigConstants.STREAM_INITIAL_POSITION)) { String initPosType = config.getProperty(ConsumerConfigConstants.STREAM_IN...
KinesisConfigUtil { public static void validateConsumerConfiguration(Properties config) { checkNotNull(config, "config can not be null"); validateAwsConfiguration(config); if (config.containsKey(ConsumerConfigConstants.STREAM_INITIAL_POSITION)) { String initPosType = config.getProperty(ConsumerConfigConstants.STREAM_IN...
KinesisConfigUtil { public static void validateConsumerConfiguration(Properties config) { checkNotNull(config, "config can not be null"); validateAwsConfiguration(config); if (config.containsKey(ConsumerConfigConstants.STREAM_INITIAL_POSITION)) { String initPosType = config.getProperty(ConsumerConfigConstants.STREAM_IN...
@Test public void testUnparsableLongForGetRecordsBackoffBaseMillisInConfig() { exception.expect(IllegalArgumentException.class); exception.expectMessage("Invalid value given for get records operation base backoff milliseconds"); Properties testConfig = TestUtils.getStandardProperties(); testConfig.setProperty(ConsumerC...
public static void validateConsumerConfiguration(Properties config) { checkNotNull(config, "config can not be null"); validateAwsConfiguration(config); if (config.containsKey(ConsumerConfigConstants.STREAM_INITIAL_POSITION)) { String initPosType = config.getProperty(ConsumerConfigConstants.STREAM_INITIAL_POSITION); try...
KinesisConfigUtil { public static void validateConsumerConfiguration(Properties config) { checkNotNull(config, "config can not be null"); validateAwsConfiguration(config); if (config.containsKey(ConsumerConfigConstants.STREAM_INITIAL_POSITION)) { String initPosType = config.getProperty(ConsumerConfigConstants.STREAM_IN...
KinesisConfigUtil { public static void validateConsumerConfiguration(Properties config) { checkNotNull(config, "config can not be null"); validateAwsConfiguration(config); if (config.containsKey(ConsumerConfigConstants.STREAM_INITIAL_POSITION)) { String initPosType = config.getProperty(ConsumerConfigConstants.STREAM_IN...
KinesisConfigUtil { public static void validateConsumerConfiguration(Properties config) { checkNotNull(config, "config can not be null"); validateAwsConfiguration(config); if (config.containsKey(ConsumerConfigConstants.STREAM_INITIAL_POSITION)) { String initPosType = config.getProperty(ConsumerConfigConstants.STREAM_IN...
KinesisConfigUtil { public static void validateConsumerConfiguration(Properties config) { checkNotNull(config, "config can not be null"); validateAwsConfiguration(config); if (config.containsKey(ConsumerConfigConstants.STREAM_INITIAL_POSITION)) { String initPosType = config.getProperty(ConsumerConfigConstants.STREAM_IN...
@Test public void testUnparsableLongForGetRecordsBackoffMaxMillisInConfig() { exception.expect(IllegalArgumentException.class); exception.expectMessage("Invalid value given for get records operation max backoff milliseconds"); Properties testConfig = TestUtils.getStandardProperties(); testConfig.setProperty(ConsumerCon...
public static void validateConsumerConfiguration(Properties config) { checkNotNull(config, "config can not be null"); validateAwsConfiguration(config); if (config.containsKey(ConsumerConfigConstants.STREAM_INITIAL_POSITION)) { String initPosType = config.getProperty(ConsumerConfigConstants.STREAM_INITIAL_POSITION); try...
KinesisConfigUtil { public static void validateConsumerConfiguration(Properties config) { checkNotNull(config, "config can not be null"); validateAwsConfiguration(config); if (config.containsKey(ConsumerConfigConstants.STREAM_INITIAL_POSITION)) { String initPosType = config.getProperty(ConsumerConfigConstants.STREAM_IN...
KinesisConfigUtil { public static void validateConsumerConfiguration(Properties config) { checkNotNull(config, "config can not be null"); validateAwsConfiguration(config); if (config.containsKey(ConsumerConfigConstants.STREAM_INITIAL_POSITION)) { String initPosType = config.getProperty(ConsumerConfigConstants.STREAM_IN...
KinesisConfigUtil { public static void validateConsumerConfiguration(Properties config) { checkNotNull(config, "config can not be null"); validateAwsConfiguration(config); if (config.containsKey(ConsumerConfigConstants.STREAM_INITIAL_POSITION)) { String initPosType = config.getProperty(ConsumerConfigConstants.STREAM_IN...
KinesisConfigUtil { public static void validateConsumerConfiguration(Properties config) { checkNotNull(config, "config can not be null"); validateAwsConfiguration(config); if (config.containsKey(ConsumerConfigConstants.STREAM_INITIAL_POSITION)) { String initPosType = config.getProperty(ConsumerConfigConstants.STREAM_IN...
@Test public void testUnparsableDoubleForGetRecordsBackoffExponentialConstantInConfig() { exception.expect(IllegalArgumentException.class); exception.expectMessage("Invalid value given for get records operation backoff exponential constant"); Properties testConfig = TestUtils.getStandardProperties(); testConfig.setProp...
public static void validateConsumerConfiguration(Properties config) { checkNotNull(config, "config can not be null"); validateAwsConfiguration(config); if (config.containsKey(ConsumerConfigConstants.STREAM_INITIAL_POSITION)) { String initPosType = config.getProperty(ConsumerConfigConstants.STREAM_INITIAL_POSITION); try...
KinesisConfigUtil { public static void validateConsumerConfiguration(Properties config) { checkNotNull(config, "config can not be null"); validateAwsConfiguration(config); if (config.containsKey(ConsumerConfigConstants.STREAM_INITIAL_POSITION)) { String initPosType = config.getProperty(ConsumerConfigConstants.STREAM_IN...
KinesisConfigUtil { public static void validateConsumerConfiguration(Properties config) { checkNotNull(config, "config can not be null"); validateAwsConfiguration(config); if (config.containsKey(ConsumerConfigConstants.STREAM_INITIAL_POSITION)) { String initPosType = config.getProperty(ConsumerConfigConstants.STREAM_IN...
KinesisConfigUtil { public static void validateConsumerConfiguration(Properties config) { checkNotNull(config, "config can not be null"); validateAwsConfiguration(config); if (config.containsKey(ConsumerConfigConstants.STREAM_INITIAL_POSITION)) { String initPosType = config.getProperty(ConsumerConfigConstants.STREAM_IN...
KinesisConfigUtil { public static void validateConsumerConfiguration(Properties config) { checkNotNull(config, "config can not be null"); validateAwsConfiguration(config); if (config.containsKey(ConsumerConfigConstants.STREAM_INITIAL_POSITION)) { String initPosType = config.getProperty(ConsumerConfigConstants.STREAM_IN...
@Test public void testUnparsableLongForGetRecordsIntervalMillisInConfig() { exception.expect(IllegalArgumentException.class); exception.expectMessage("Invalid value given for getRecords sleep interval in milliseconds"); Properties testConfig = TestUtils.getStandardProperties(); testConfig.setProperty(ConsumerConfigCons...
public static void validateConsumerConfiguration(Properties config) { checkNotNull(config, "config can not be null"); validateAwsConfiguration(config); if (config.containsKey(ConsumerConfigConstants.STREAM_INITIAL_POSITION)) { String initPosType = config.getProperty(ConsumerConfigConstants.STREAM_INITIAL_POSITION); try...
KinesisConfigUtil { public static void validateConsumerConfiguration(Properties config) { checkNotNull(config, "config can not be null"); validateAwsConfiguration(config); if (config.containsKey(ConsumerConfigConstants.STREAM_INITIAL_POSITION)) { String initPosType = config.getProperty(ConsumerConfigConstants.STREAM_IN...
KinesisConfigUtil { public static void validateConsumerConfiguration(Properties config) { checkNotNull(config, "config can not be null"); validateAwsConfiguration(config); if (config.containsKey(ConsumerConfigConstants.STREAM_INITIAL_POSITION)) { String initPosType = config.getProperty(ConsumerConfigConstants.STREAM_IN...
KinesisConfigUtil { public static void validateConsumerConfiguration(Properties config) { checkNotNull(config, "config can not be null"); validateAwsConfiguration(config); if (config.containsKey(ConsumerConfigConstants.STREAM_INITIAL_POSITION)) { String initPosType = config.getProperty(ConsumerConfigConstants.STREAM_IN...
KinesisConfigUtil { public static void validateConsumerConfiguration(Properties config) { checkNotNull(config, "config can not be null"); validateAwsConfiguration(config); if (config.containsKey(ConsumerConfigConstants.STREAM_INITIAL_POSITION)) { String initPosType = config.getProperty(ConsumerConfigConstants.STREAM_IN...
@Test public void testUnparsableIntForGetShardIteratorRetriesInConfig() { exception.expect(IllegalArgumentException.class); exception.expectMessage("Invalid value given for maximum retry attempts for getShardIterator shard operation"); Properties testConfig = TestUtils.getStandardProperties(); testConfig.setProperty(Co...
public static void validateConsumerConfiguration(Properties config) { checkNotNull(config, "config can not be null"); validateAwsConfiguration(config); if (config.containsKey(ConsumerConfigConstants.STREAM_INITIAL_POSITION)) { String initPosType = config.getProperty(ConsumerConfigConstants.STREAM_INITIAL_POSITION); try...
KinesisConfigUtil { public static void validateConsumerConfiguration(Properties config) { checkNotNull(config, "config can not be null"); validateAwsConfiguration(config); if (config.containsKey(ConsumerConfigConstants.STREAM_INITIAL_POSITION)) { String initPosType = config.getProperty(ConsumerConfigConstants.STREAM_IN...
KinesisConfigUtil { public static void validateConsumerConfiguration(Properties config) { checkNotNull(config, "config can not be null"); validateAwsConfiguration(config); if (config.containsKey(ConsumerConfigConstants.STREAM_INITIAL_POSITION)) { String initPosType = config.getProperty(ConsumerConfigConstants.STREAM_IN...
KinesisConfigUtil { public static void validateConsumerConfiguration(Properties config) { checkNotNull(config, "config can not be null"); validateAwsConfiguration(config); if (config.containsKey(ConsumerConfigConstants.STREAM_INITIAL_POSITION)) { String initPosType = config.getProperty(ConsumerConfigConstants.STREAM_IN...
KinesisConfigUtil { public static void validateConsumerConfiguration(Properties config) { checkNotNull(config, "config can not be null"); validateAwsConfiguration(config); if (config.containsKey(ConsumerConfigConstants.STREAM_INITIAL_POSITION)) { String initPosType = config.getProperty(ConsumerConfigConstants.STREAM_IN...
@Test public void testUnparsableLongForGetShardIteratorBackoffBaseMillisInConfig() { exception.expect(IllegalArgumentException.class); exception.expectMessage("Invalid value given for get shard iterator operation base backoff milliseconds"); Properties testConfig = TestUtils.getStandardProperties(); testConfig.setPrope...
public static void validateConsumerConfiguration(Properties config) { checkNotNull(config, "config can not be null"); validateAwsConfiguration(config); if (config.containsKey(ConsumerConfigConstants.STREAM_INITIAL_POSITION)) { String initPosType = config.getProperty(ConsumerConfigConstants.STREAM_INITIAL_POSITION); try...
KinesisConfigUtil { public static void validateConsumerConfiguration(Properties config) { checkNotNull(config, "config can not be null"); validateAwsConfiguration(config); if (config.containsKey(ConsumerConfigConstants.STREAM_INITIAL_POSITION)) { String initPosType = config.getProperty(ConsumerConfigConstants.STREAM_IN...
KinesisConfigUtil { public static void validateConsumerConfiguration(Properties config) { checkNotNull(config, "config can not be null"); validateAwsConfiguration(config); if (config.containsKey(ConsumerConfigConstants.STREAM_INITIAL_POSITION)) { String initPosType = config.getProperty(ConsumerConfigConstants.STREAM_IN...
KinesisConfigUtil { public static void validateConsumerConfiguration(Properties config) { checkNotNull(config, "config can not be null"); validateAwsConfiguration(config); if (config.containsKey(ConsumerConfigConstants.STREAM_INITIAL_POSITION)) { String initPosType = config.getProperty(ConsumerConfigConstants.STREAM_IN...
KinesisConfigUtil { public static void validateConsumerConfiguration(Properties config) { checkNotNull(config, "config can not be null"); validateAwsConfiguration(config); if (config.containsKey(ConsumerConfigConstants.STREAM_INITIAL_POSITION)) { String initPosType = config.getProperty(ConsumerConfigConstants.STREAM_IN...
@Test public void testUnparsableLongForGetShardIteratorBackoffMaxMillisInConfig() { exception.expect(IllegalArgumentException.class); exception.expectMessage("Invalid value given for get shard iterator operation max backoff milliseconds"); Properties testConfig = TestUtils.getStandardProperties(); testConfig.setPropert...
public static void validateConsumerConfiguration(Properties config) { checkNotNull(config, "config can not be null"); validateAwsConfiguration(config); if (config.containsKey(ConsumerConfigConstants.STREAM_INITIAL_POSITION)) { String initPosType = config.getProperty(ConsumerConfigConstants.STREAM_INITIAL_POSITION); try...
KinesisConfigUtil { public static void validateConsumerConfiguration(Properties config) { checkNotNull(config, "config can not be null"); validateAwsConfiguration(config); if (config.containsKey(ConsumerConfigConstants.STREAM_INITIAL_POSITION)) { String initPosType = config.getProperty(ConsumerConfigConstants.STREAM_IN...
KinesisConfigUtil { public static void validateConsumerConfiguration(Properties config) { checkNotNull(config, "config can not be null"); validateAwsConfiguration(config); if (config.containsKey(ConsumerConfigConstants.STREAM_INITIAL_POSITION)) { String initPosType = config.getProperty(ConsumerConfigConstants.STREAM_IN...
KinesisConfigUtil { public static void validateConsumerConfiguration(Properties config) { checkNotNull(config, "config can not be null"); validateAwsConfiguration(config); if (config.containsKey(ConsumerConfigConstants.STREAM_INITIAL_POSITION)) { String initPosType = config.getProperty(ConsumerConfigConstants.STREAM_IN...
KinesisConfigUtil { public static void validateConsumerConfiguration(Properties config) { checkNotNull(config, "config can not be null"); validateAwsConfiguration(config); if (config.containsKey(ConsumerConfigConstants.STREAM_INITIAL_POSITION)) { String initPosType = config.getProperty(ConsumerConfigConstants.STREAM_IN...
@Test public void testUnparsableDoubleForGetShardIteratorBackoffExponentialConstantInConfig() { exception.expect(IllegalArgumentException.class); exception.expectMessage("Invalid value given for get shard iterator operation backoff exponential constant"); Properties testConfig = TestUtils.getStandardProperties(); testC...
public static void validateConsumerConfiguration(Properties config) { checkNotNull(config, "config can not be null"); validateAwsConfiguration(config); if (config.containsKey(ConsumerConfigConstants.STREAM_INITIAL_POSITION)) { String initPosType = config.getProperty(ConsumerConfigConstants.STREAM_INITIAL_POSITION); try...
KinesisConfigUtil { public static void validateConsumerConfiguration(Properties config) { checkNotNull(config, "config can not be null"); validateAwsConfiguration(config); if (config.containsKey(ConsumerConfigConstants.STREAM_INITIAL_POSITION)) { String initPosType = config.getProperty(ConsumerConfigConstants.STREAM_IN...
KinesisConfigUtil { public static void validateConsumerConfiguration(Properties config) { checkNotNull(config, "config can not be null"); validateAwsConfiguration(config); if (config.containsKey(ConsumerConfigConstants.STREAM_INITIAL_POSITION)) { String initPosType = config.getProperty(ConsumerConfigConstants.STREAM_IN...
KinesisConfigUtil { public static void validateConsumerConfiguration(Properties config) { checkNotNull(config, "config can not be null"); validateAwsConfiguration(config); if (config.containsKey(ConsumerConfigConstants.STREAM_INITIAL_POSITION)) { String initPosType = config.getProperty(ConsumerConfigConstants.STREAM_IN...
KinesisConfigUtil { public static void validateConsumerConfiguration(Properties config) { checkNotNull(config, "config can not be null"); validateAwsConfiguration(config); if (config.containsKey(ConsumerConfigConstants.STREAM_INITIAL_POSITION)) { String initPosType = config.getProperty(ConsumerConfigConstants.STREAM_IN...
@Test(expected = IllegalConfigurationException.class) public void testInvalidConfiguration() throws IOException { GlobalConfiguration.loadConfiguration(tempFolder.getRoot().getAbsolutePath()); }
public static Configuration loadConfiguration() { final String configDir = System.getenv(ConfigConstants.ENV_FLINK_CONF_DIR); if (configDir == null) { return new Configuration(); } return loadConfiguration(configDir, null); }
GlobalConfiguration { public static Configuration loadConfiguration() { final String configDir = System.getenv(ConfigConstants.ENV_FLINK_CONF_DIR); if (configDir == null) { return new Configuration(); } return loadConfiguration(configDir, null); } }
GlobalConfiguration { public static Configuration loadConfiguration() { final String configDir = System.getenv(ConfigConstants.ENV_FLINK_CONF_DIR); if (configDir == null) { return new Configuration(); } return loadConfiguration(configDir, null); } private GlobalConfiguration(); }
GlobalConfiguration { public static Configuration loadConfiguration() { final String configDir = System.getenv(ConfigConstants.ENV_FLINK_CONF_DIR); if (configDir == null) { return new Configuration(); } return loadConfiguration(configDir, null); } private GlobalConfiguration(); static Configuration loadConfiguration()...
GlobalConfiguration { public static Configuration loadConfiguration() { final String configDir = System.getenv(ConfigConstants.ENV_FLINK_CONF_DIR); if (configDir == null) { return new Configuration(); } return loadConfiguration(configDir, null); } private GlobalConfiguration(); static Configuration loadConfiguration()...
@Test public void testUnparsableLongForShardDiscoveryIntervalMillisInConfig() { exception.expect(IllegalArgumentException.class); exception.expectMessage("Invalid value given for shard discovery sleep interval in milliseconds"); Properties testConfig = TestUtils.getStandardProperties(); testConfig.setProperty(ConsumerC...
public static void validateConsumerConfiguration(Properties config) { checkNotNull(config, "config can not be null"); validateAwsConfiguration(config); if (config.containsKey(ConsumerConfigConstants.STREAM_INITIAL_POSITION)) { String initPosType = config.getProperty(ConsumerConfigConstants.STREAM_INITIAL_POSITION); try...
KinesisConfigUtil { public static void validateConsumerConfiguration(Properties config) { checkNotNull(config, "config can not be null"); validateAwsConfiguration(config); if (config.containsKey(ConsumerConfigConstants.STREAM_INITIAL_POSITION)) { String initPosType = config.getProperty(ConsumerConfigConstants.STREAM_IN...
KinesisConfigUtil { public static void validateConsumerConfiguration(Properties config) { checkNotNull(config, "config can not be null"); validateAwsConfiguration(config); if (config.containsKey(ConsumerConfigConstants.STREAM_INITIAL_POSITION)) { String initPosType = config.getProperty(ConsumerConfigConstants.STREAM_IN...
KinesisConfigUtil { public static void validateConsumerConfiguration(Properties config) { checkNotNull(config, "config can not be null"); validateAwsConfiguration(config); if (config.containsKey(ConsumerConfigConstants.STREAM_INITIAL_POSITION)) { String initPosType = config.getProperty(ConsumerConfigConstants.STREAM_IN...
KinesisConfigUtil { public static void validateConsumerConfiguration(Properties config) { checkNotNull(config, "config can not be null"); validateAwsConfiguration(config); if (config.containsKey(ConsumerConfigConstants.STREAM_INITIAL_POSITION)) { String initPosType = config.getProperty(ConsumerConfigConstants.STREAM_IN...
@Test public void testConfigureWithNonSerializableCustomPartitionerFails() { exception.expect(IllegalArgumentException.class); exception.expectMessage("The provided custom partitioner is not serializable"); new FlinkKinesisProducer<>(new SimpleStringSchema(), TestUtils.getStandardProperties()) .setCustomPartitioner(new...
public void setCustomPartitioner(KinesisPartitioner<OUT> partitioner) { checkNotNull(partitioner, "partitioner cannot be null"); checkArgument( InstantiationUtil.isSerializable(partitioner), "The provided custom partitioner is not serializable: " + partitioner.getClass().getName() + ". " + "Please check that it does no...
FlinkKinesisProducer extends RichSinkFunction<OUT> implements CheckpointedFunction { public void setCustomPartitioner(KinesisPartitioner<OUT> partitioner) { checkNotNull(partitioner, "partitioner cannot be null"); checkArgument( InstantiationUtil.isSerializable(partitioner), "The provided custom partitioner is not seri...
FlinkKinesisProducer extends RichSinkFunction<OUT> implements CheckpointedFunction { public void setCustomPartitioner(KinesisPartitioner<OUT> partitioner) { checkNotNull(partitioner, "partitioner cannot be null"); checkArgument( InstantiationUtil.isSerializable(partitioner), "The provided custom partitioner is not seri...
FlinkKinesisProducer extends RichSinkFunction<OUT> implements CheckpointedFunction { public void setCustomPartitioner(KinesisPartitioner<OUT> partitioner) { checkNotNull(partitioner, "partitioner cannot be null"); checkArgument( InstantiationUtil.isSerializable(partitioner), "The provided custom partitioner is not seri...
FlinkKinesisProducer extends RichSinkFunction<OUT> implements CheckpointedFunction { public void setCustomPartitioner(KinesisPartitioner<OUT> partitioner) { checkNotNull(partitioner, "partitioner cannot be null"); checkArgument( InstantiationUtil.isSerializable(partitioner), "The provided custom partitioner is not seri...
@Test public void testConfigureWithSerializableCustomPartitioner() { new FlinkKinesisProducer<>(new SimpleStringSchema(), TestUtils.getStandardProperties()) .setCustomPartitioner(new SerializableCustomPartitioner()); }
public void setCustomPartitioner(KinesisPartitioner<OUT> partitioner) { checkNotNull(partitioner, "partitioner cannot be null"); checkArgument( InstantiationUtil.isSerializable(partitioner), "The provided custom partitioner is not serializable: " + partitioner.getClass().getName() + ". " + "Please check that it does no...
FlinkKinesisProducer extends RichSinkFunction<OUT> implements CheckpointedFunction { public void setCustomPartitioner(KinesisPartitioner<OUT> partitioner) { checkNotNull(partitioner, "partitioner cannot be null"); checkArgument( InstantiationUtil.isSerializable(partitioner), "The provided custom partitioner is not seri...
FlinkKinesisProducer extends RichSinkFunction<OUT> implements CheckpointedFunction { public void setCustomPartitioner(KinesisPartitioner<OUT> partitioner) { checkNotNull(partitioner, "partitioner cannot be null"); checkArgument( InstantiationUtil.isSerializable(partitioner), "The provided custom partitioner is not seri...
FlinkKinesisProducer extends RichSinkFunction<OUT> implements CheckpointedFunction { public void setCustomPartitioner(KinesisPartitioner<OUT> partitioner) { checkNotNull(partitioner, "partitioner cannot be null"); checkArgument( InstantiationUtil.isSerializable(partitioner), "The provided custom partitioner is not seri...
FlinkKinesisProducer extends RichSinkFunction<OUT> implements CheckpointedFunction { public void setCustomPartitioner(KinesisPartitioner<OUT> partitioner) { checkNotNull(partitioner, "partitioner cannot be null"); checkArgument( InstantiationUtil.isSerializable(partitioner), "The provided custom partitioner is not seri...
@SuppressWarnings("ResultOfMethodCallIgnored") @Test public void testAsyncErrorRethrownOnInvoke() throws Throwable { final DummyFlinkKinesisProducer<String> producer = new DummyFlinkKinesisProducer<>(new SimpleStringSchema()); OneInputStreamOperatorTestHarness<String, Object> testHarness = new OneInputStreamOperatorTes...
@Override public void open(Configuration parameters) throws Exception { super.open(parameters); KinesisProducerConfiguration producerConfig = KinesisConfigUtil.getValidatedProducerConfiguration(configProps); producer = getKinesisProducer(producerConfig); callback = new FutureCallback<UserRecordResult>() { @Override pub...
FlinkKinesisProducer extends RichSinkFunction<OUT> implements CheckpointedFunction { @Override public void open(Configuration parameters) throws Exception { super.open(parameters); KinesisProducerConfiguration producerConfig = KinesisConfigUtil.getValidatedProducerConfiguration(configProps); producer = getKinesisProduc...
FlinkKinesisProducer extends RichSinkFunction<OUT> implements CheckpointedFunction { @Override public void open(Configuration parameters) throws Exception { super.open(parameters); KinesisProducerConfiguration producerConfig = KinesisConfigUtil.getValidatedProducerConfiguration(configProps); producer = getKinesisProduc...
FlinkKinesisProducer extends RichSinkFunction<OUT> implements CheckpointedFunction { @Override public void open(Configuration parameters) throws Exception { super.open(parameters); KinesisProducerConfiguration producerConfig = KinesisConfigUtil.getValidatedProducerConfiguration(configProps); producer = getKinesisProduc...
FlinkKinesisProducer extends RichSinkFunction<OUT> implements CheckpointedFunction { @Override public void open(Configuration parameters) throws Exception { super.open(parameters); KinesisProducerConfiguration producerConfig = KinesisConfigUtil.getValidatedProducerConfiguration(configProps); producer = getKinesisProduc...
@SuppressWarnings("ResultOfMethodCallIgnored") @Test public void testAsyncErrorRethrownOnCheckpoint() throws Throwable { final DummyFlinkKinesisProducer<String> producer = new DummyFlinkKinesisProducer<>(new SimpleStringSchema()); OneInputStreamOperatorTestHarness<String, Object> testHarness = new OneInputStreamOperato...
@Override public void open(Configuration parameters) throws Exception { super.open(parameters); KinesisProducerConfiguration producerConfig = KinesisConfigUtil.getValidatedProducerConfiguration(configProps); producer = getKinesisProducer(producerConfig); callback = new FutureCallback<UserRecordResult>() { @Override pub...
FlinkKinesisProducer extends RichSinkFunction<OUT> implements CheckpointedFunction { @Override public void open(Configuration parameters) throws Exception { super.open(parameters); KinesisProducerConfiguration producerConfig = KinesisConfigUtil.getValidatedProducerConfiguration(configProps); producer = getKinesisProduc...
FlinkKinesisProducer extends RichSinkFunction<OUT> implements CheckpointedFunction { @Override public void open(Configuration parameters) throws Exception { super.open(parameters); KinesisProducerConfiguration producerConfig = KinesisConfigUtil.getValidatedProducerConfiguration(configProps); producer = getKinesisProduc...
FlinkKinesisProducer extends RichSinkFunction<OUT> implements CheckpointedFunction { @Override public void open(Configuration parameters) throws Exception { super.open(parameters); KinesisProducerConfiguration producerConfig = KinesisConfigUtil.getValidatedProducerConfiguration(configProps); producer = getKinesisProduc...
FlinkKinesisProducer extends RichSinkFunction<OUT> implements CheckpointedFunction { @Override public void open(Configuration parameters) throws Exception { super.open(parameters); KinesisProducerConfiguration producerConfig = KinesisConfigUtil.getValidatedProducerConfiguration(configProps); producer = getKinesisProduc...
@SuppressWarnings("ResultOfMethodCallIgnored") @Test(timeout = 10000) public void testAsyncErrorRethrownAfterFlush() throws Throwable { final DummyFlinkKinesisProducer<String> producer = new DummyFlinkKinesisProducer<>(new SimpleStringSchema()); OneInputStreamOperatorTestHarness<String, Object> testHarness = new OneInp...
@Override public void open(Configuration parameters) throws Exception { super.open(parameters); KinesisProducerConfiguration producerConfig = KinesisConfigUtil.getValidatedProducerConfiguration(configProps); producer = getKinesisProducer(producerConfig); callback = new FutureCallback<UserRecordResult>() { @Override pub...
FlinkKinesisProducer extends RichSinkFunction<OUT> implements CheckpointedFunction { @Override public void open(Configuration parameters) throws Exception { super.open(parameters); KinesisProducerConfiguration producerConfig = KinesisConfigUtil.getValidatedProducerConfiguration(configProps); producer = getKinesisProduc...
FlinkKinesisProducer extends RichSinkFunction<OUT> implements CheckpointedFunction { @Override public void open(Configuration parameters) throws Exception { super.open(parameters); KinesisProducerConfiguration producerConfig = KinesisConfigUtil.getValidatedProducerConfiguration(configProps); producer = getKinesisProduc...
FlinkKinesisProducer extends RichSinkFunction<OUT> implements CheckpointedFunction { @Override public void open(Configuration parameters) throws Exception { super.open(parameters); KinesisProducerConfiguration producerConfig = KinesisConfigUtil.getValidatedProducerConfiguration(configProps); producer = getKinesisProduc...
FlinkKinesisProducer extends RichSinkFunction<OUT> implements CheckpointedFunction { @Override public void open(Configuration parameters) throws Exception { super.open(parameters); KinesisProducerConfiguration producerConfig = KinesisConfigUtil.getValidatedProducerConfiguration(configProps); producer = getKinesisProduc...
@Test public void testMetricsReporting() { StreamShardHandle fakeToBeConsumedShard = getMockStreamShard("fakeStream", 0); LinkedList<KinesisStreamShardState> subscribedShardsStateUnderTest = new LinkedList<>(); subscribedShardsStateUnderTest.add( new KinesisStreamShardState( KinesisDataFetcher.convertToStreamShardMetad...
@SuppressWarnings("unchecked") @Override public void run() { String nextShardItr; try { if (lastSequenceNum.equals(SentinelSequenceNumber.SENTINEL_LATEST_SEQUENCE_NUM.get())) { if (subscribedShard.isClosed()) { nextShardItr = null; } else { nextShardItr = kinesis.getShardIterator(subscribedShard, ShardIteratorType.LATE...
ShardConsumer implements Runnable { @SuppressWarnings("unchecked") @Override public void run() { String nextShardItr; try { if (lastSequenceNum.equals(SentinelSequenceNumber.SENTINEL_LATEST_SEQUENCE_NUM.get())) { if (subscribedShard.isClosed()) { nextShardItr = null; } else { nextShardItr = kinesis.getShardIterator(sub...
ShardConsumer implements Runnable { @SuppressWarnings("unchecked") @Override public void run() { String nextShardItr; try { if (lastSequenceNum.equals(SentinelSequenceNumber.SENTINEL_LATEST_SEQUENCE_NUM.get())) { if (subscribedShard.isClosed()) { nextShardItr = null; } else { nextShardItr = kinesis.getShardIterator(sub...
ShardConsumer implements Runnable { @SuppressWarnings("unchecked") @Override public void run() { String nextShardItr; try { if (lastSequenceNum.equals(SentinelSequenceNumber.SENTINEL_LATEST_SEQUENCE_NUM.get())) { if (subscribedShard.isClosed()) { nextShardItr = null; } else { nextShardItr = kinesis.getShardIterator(sub...
ShardConsumer implements Runnable { @SuppressWarnings("unchecked") @Override public void run() { String nextShardItr; try { if (lastSequenceNum.equals(SentinelSequenceNumber.SENTINEL_LATEST_SEQUENCE_NUM.get())) { if (subscribedShard.isClosed()) { nextShardItr = null; } else { nextShardItr = kinesis.getShardIterator(sub...
@Test public void testCorrectNumOfCollectedRecordsAndUpdatedState() { StreamShardHandle fakeToBeConsumedShard = getMockStreamShard("fakeStream", 0); LinkedList<KinesisStreamShardState> subscribedShardsStateUnderTest = new LinkedList<>(); subscribedShardsStateUnderTest.add( new KinesisStreamShardState(KinesisDataFetcher...
@SuppressWarnings("unchecked") @Override public void run() { String nextShardItr; try { if (lastSequenceNum.equals(SentinelSequenceNumber.SENTINEL_LATEST_SEQUENCE_NUM.get())) { if (subscribedShard.isClosed()) { nextShardItr = null; } else { nextShardItr = kinesis.getShardIterator(subscribedShard, ShardIteratorType.LATE...
ShardConsumer implements Runnable { @SuppressWarnings("unchecked") @Override public void run() { String nextShardItr; try { if (lastSequenceNum.equals(SentinelSequenceNumber.SENTINEL_LATEST_SEQUENCE_NUM.get())) { if (subscribedShard.isClosed()) { nextShardItr = null; } else { nextShardItr = kinesis.getShardIterator(sub...
ShardConsumer implements Runnable { @SuppressWarnings("unchecked") @Override public void run() { String nextShardItr; try { if (lastSequenceNum.equals(SentinelSequenceNumber.SENTINEL_LATEST_SEQUENCE_NUM.get())) { if (subscribedShard.isClosed()) { nextShardItr = null; } else { nextShardItr = kinesis.getShardIterator(sub...
ShardConsumer implements Runnable { @SuppressWarnings("unchecked") @Override public void run() { String nextShardItr; try { if (lastSequenceNum.equals(SentinelSequenceNumber.SENTINEL_LATEST_SEQUENCE_NUM.get())) { if (subscribedShard.isClosed()) { nextShardItr = null; } else { nextShardItr = kinesis.getShardIterator(sub...
ShardConsumer implements Runnable { @SuppressWarnings("unchecked") @Override public void run() { String nextShardItr; try { if (lastSequenceNum.equals(SentinelSequenceNumber.SENTINEL_LATEST_SEQUENCE_NUM.get())) { if (subscribedShard.isClosed()) { nextShardItr = null; } else { nextShardItr = kinesis.getShardIterator(sub...
@Test public void testCorrectNumOfCollectedRecordsAndUpdatedStateWithUnexpectedExpiredIterator() { StreamShardHandle fakeToBeConsumedShard = getMockStreamShard("fakeStream", 0); LinkedList<KinesisStreamShardState> subscribedShardsStateUnderTest = new LinkedList<>(); subscribedShardsStateUnderTest.add( new KinesisStream...
@SuppressWarnings("unchecked") @Override public void run() { String nextShardItr; try { if (lastSequenceNum.equals(SentinelSequenceNumber.SENTINEL_LATEST_SEQUENCE_NUM.get())) { if (subscribedShard.isClosed()) { nextShardItr = null; } else { nextShardItr = kinesis.getShardIterator(subscribedShard, ShardIteratorType.LATE...
ShardConsumer implements Runnable { @SuppressWarnings("unchecked") @Override public void run() { String nextShardItr; try { if (lastSequenceNum.equals(SentinelSequenceNumber.SENTINEL_LATEST_SEQUENCE_NUM.get())) { if (subscribedShard.isClosed()) { nextShardItr = null; } else { nextShardItr = kinesis.getShardIterator(sub...
ShardConsumer implements Runnable { @SuppressWarnings("unchecked") @Override public void run() { String nextShardItr; try { if (lastSequenceNum.equals(SentinelSequenceNumber.SENTINEL_LATEST_SEQUENCE_NUM.get())) { if (subscribedShard.isClosed()) { nextShardItr = null; } else { nextShardItr = kinesis.getShardIterator(sub...
ShardConsumer implements Runnable { @SuppressWarnings("unchecked") @Override public void run() { String nextShardItr; try { if (lastSequenceNum.equals(SentinelSequenceNumber.SENTINEL_LATEST_SEQUENCE_NUM.get())) { if (subscribedShard.isClosed()) { nextShardItr = null; } else { nextShardItr = kinesis.getShardIterator(sub...
ShardConsumer implements Runnable { @SuppressWarnings("unchecked") @Override public void run() { String nextShardItr; try { if (lastSequenceNum.equals(SentinelSequenceNumber.SENTINEL_LATEST_SEQUENCE_NUM.get())) { if (subscribedShard.isClosed()) { nextShardItr = null; } else { nextShardItr = kinesis.getShardIterator(sub...
@Test public void testSkipCorruptedRecord() throws Exception { final String stream = "fakeStream"; final int numShards = 3; final LinkedList<KinesisStreamShardState> testShardStates = new LinkedList<>(); final TestSourceContext<String> sourceContext = new TestSourceContext<>(); final TestableKinesisDataFetcher<String> ...
protected void emitRecordAndUpdateState(T record, long recordTimestamp, int shardStateIndex, SequenceNumber lastSequenceNumber) { synchronized (checkpointLock) { if (record != null) { sourceContext.collectWithTimestamp(record, recordTimestamp); } else { LOG.warn("Skipping non-deserializable record at sequence number {}...
KinesisDataFetcher { protected void emitRecordAndUpdateState(T record, long recordTimestamp, int shardStateIndex, SequenceNumber lastSequenceNumber) { synchronized (checkpointLock) { if (record != null) { sourceContext.collectWithTimestamp(record, recordTimestamp); } else { LOG.warn("Skipping non-deserializable record ...
KinesisDataFetcher { protected void emitRecordAndUpdateState(T record, long recordTimestamp, int shardStateIndex, SequenceNumber lastSequenceNumber) { synchronized (checkpointLock) { if (record != null) { sourceContext.collectWithTimestamp(record, recordTimestamp); } else { LOG.warn("Skipping non-deserializable record ...
KinesisDataFetcher { protected void emitRecordAndUpdateState(T record, long recordTimestamp, int shardStateIndex, SequenceNumber lastSequenceNumber) { synchronized (checkpointLock) { if (record != null) { sourceContext.collectWithTimestamp(record, recordTimestamp); } else { LOG.warn("Skipping non-deserializable record ...
KinesisDataFetcher { protected void emitRecordAndUpdateState(T record, long recordTimestamp, int shardStateIndex, SequenceNumber lastSequenceNumber) { synchronized (checkpointLock) { if (record != null) { sourceContext.collectWithTimestamp(record, recordTimestamp); } else { LOG.warn("Skipping non-deserializable record ...
@Test public void testInvalidYamlFile() throws IOException { final File confFile = tempFolder.newFile(GlobalConfiguration.FLINK_CONF_FILENAME); try (PrintWriter pw = new PrintWriter(confFile)) { pw.append("invalid"); } assertNotNull(GlobalConfiguration.loadConfiguration(tempFolder.getRoot().getAbsolutePath())); }
public static Configuration loadConfiguration() { final String configDir = System.getenv(ConfigConstants.ENV_FLINK_CONF_DIR); if (configDir == null) { return new Configuration(); } return loadConfiguration(configDir, null); }
GlobalConfiguration { public static Configuration loadConfiguration() { final String configDir = System.getenv(ConfigConstants.ENV_FLINK_CONF_DIR); if (configDir == null) { return new Configuration(); } return loadConfiguration(configDir, null); } }
GlobalConfiguration { public static Configuration loadConfiguration() { final String configDir = System.getenv(ConfigConstants.ENV_FLINK_CONF_DIR); if (configDir == null) { return new Configuration(); } return loadConfiguration(configDir, null); } private GlobalConfiguration(); }
GlobalConfiguration { public static Configuration loadConfiguration() { final String configDir = System.getenv(ConfigConstants.ENV_FLINK_CONF_DIR); if (configDir == null) { return new Configuration(); } return loadConfiguration(configDir, null); } private GlobalConfiguration(); static Configuration loadConfiguration()...
GlobalConfiguration { public static Configuration loadConfiguration() { final String configDir = System.getenv(ConfigConstants.ENV_FLINK_CONF_DIR); if (configDir == null) { return new Configuration(); } return loadConfiguration(configDir, null); } private GlobalConfiguration(); static Configuration loadConfiguration()...
@Test public void testStreamToLastSeenShardStateIsCorrectlySetWhenNotRestoringFromFailure() throws Exception { List<String> fakeStreams = new LinkedList<>(); fakeStreams.add("fakeStream1"); fakeStreams.add("fakeStream2"); fakeStreams.add("fakeStream3"); fakeStreams.add("fakeStream4"); HashMap<String, String> subscribed...
protected static HashMap<String, String> createInitialSubscribedStreamsToLastDiscoveredShardsState(List<String> streams) { HashMap<String, String> initial = new HashMap<>(); for (String stream : streams) { initial.put(stream, null); } return initial; }
KinesisDataFetcher { protected static HashMap<String, String> createInitialSubscribedStreamsToLastDiscoveredShardsState(List<String> streams) { HashMap<String, String> initial = new HashMap<>(); for (String stream : streams) { initial.put(stream, null); } return initial; } }
KinesisDataFetcher { protected static HashMap<String, String> createInitialSubscribedStreamsToLastDiscoveredShardsState(List<String> streams) { HashMap<String, String> initial = new HashMap<>(); for (String stream : streams) { initial.put(stream, null); } return initial; } KinesisDataFetcher(List<String> streams, ...
KinesisDataFetcher { protected static HashMap<String, String> createInitialSubscribedStreamsToLastDiscoveredShardsState(List<String> streams) { HashMap<String, String> initial = new HashMap<>(); for (String stream : streams) { initial.put(stream, null); } return initial; } KinesisDataFetcher(List<String> streams, ...
KinesisDataFetcher { protected static HashMap<String, String> createInitialSubscribedStreamsToLastDiscoveredShardsState(List<String> streams) { HashMap<String, String> initial = new HashMap<>(); for (String stream : streams) { initial.put(stream, null); } return initial; } KinesisDataFetcher(List<String> streams, ...
@Test public void testIsThisSubtaskShouldSubscribeTo() { assertTrue(KinesisDataFetcher.isThisSubtaskShouldSubscribeTo(0, 2, 0)); assertFalse(KinesisDataFetcher.isThisSubtaskShouldSubscribeTo(1, 2, 0)); assertTrue(KinesisDataFetcher.isThisSubtaskShouldSubscribeTo(2, 2, 0)); assertFalse(KinesisDataFetcher.isThisSubtaskSh...
public static boolean isThisSubtaskShouldSubscribeTo(int shardHash, int totalNumberOfConsumerSubtasks, int indexOfThisConsumerSubtask) { return (Math.abs(shardHash % totalNumberOfConsumerSubtasks)) == indexOfThisConsumerSubtask; }
KinesisDataFetcher { public static boolean isThisSubtaskShouldSubscribeTo(int shardHash, int totalNumberOfConsumerSubtasks, int indexOfThisConsumerSubtask) { return (Math.abs(shardHash % totalNumberOfConsumerSubtasks)) == indexOfThisConsumerSubtask; } }
KinesisDataFetcher { public static boolean isThisSubtaskShouldSubscribeTo(int shardHash, int totalNumberOfConsumerSubtasks, int indexOfThisConsumerSubtask) { return (Math.abs(shardHash % totalNumberOfConsumerSubtasks)) == indexOfThisConsumerSubtask; } KinesisDataFetcher(List<String> streams, SourceFunction.Sourc...
KinesisDataFetcher { public static boolean isThisSubtaskShouldSubscribeTo(int shardHash, int totalNumberOfConsumerSubtasks, int indexOfThisConsumerSubtask) { return (Math.abs(shardHash % totalNumberOfConsumerSubtasks)) == indexOfThisConsumerSubtask; } KinesisDataFetcher(List<String> streams, SourceFunction.Sourc...
KinesisDataFetcher { public static boolean isThisSubtaskShouldSubscribeTo(int shardHash, int totalNumberOfConsumerSubtasks, int indexOfThisConsumerSubtask) { return (Math.abs(shardHash % totalNumberOfConsumerSubtasks)) == indexOfThisConsumerSubtask; } KinesisDataFetcher(List<String> streams, SourceFunction.Sourc...
@Test @SuppressWarnings("unchecked") public void testFetcherShouldNotBeRestoringFromFailureIfNotRestoringFromCheckpoint() throws Exception { KinesisDataFetcher mockedFetcher = Mockito.mock(KinesisDataFetcher.class); PowerMockito.whenNew(KinesisDataFetcher.class).withAnyArguments().thenReturn(mockedFetcher); PowerMockit...
@Override public void run(SourceContext<T> sourceContext) throws Exception { KinesisDataFetcher<T> fetcher = createFetcher(streams, sourceContext, getRuntimeContext(), configProps, deserializer); List<StreamShardHandle> allShards = fetcher.discoverNewShardsToSubscribe(); for (StreamShardHandle shard : allShards) { Stre...
FlinkKinesisConsumer extends RichParallelSourceFunction<T> implements ResultTypeQueryable<T>, CheckpointedFunction { @Override public void run(SourceContext<T> sourceContext) throws Exception { KinesisDataFetcher<T> fetcher = createFetcher(streams, sourceContext, getRuntimeContext(), configProps, deserializer); Lis...
FlinkKinesisConsumer extends RichParallelSourceFunction<T> implements ResultTypeQueryable<T>, CheckpointedFunction { @Override public void run(SourceContext<T> sourceContext) throws Exception { KinesisDataFetcher<T> fetcher = createFetcher(streams, sourceContext, getRuntimeContext(), configProps, deserializer); Lis...
FlinkKinesisConsumer extends RichParallelSourceFunction<T> implements ResultTypeQueryable<T>, CheckpointedFunction { @Override public void run(SourceContext<T> sourceContext) throws Exception { KinesisDataFetcher<T> fetcher = createFetcher(streams, sourceContext, getRuntimeContext(), configProps, deserializer); Lis...
FlinkKinesisConsumer extends RichParallelSourceFunction<T> implements ResultTypeQueryable<T>, CheckpointedFunction { @Override public void run(SourceContext<T> sourceContext) throws Exception { KinesisDataFetcher<T> fetcher = createFetcher(streams, sourceContext, getRuntimeContext(), configProps, deserializer); Lis...
@Test public void testHiddenKey() { assertTrue(GlobalConfiguration.isSensitive("password123")); assertTrue(GlobalConfiguration.isSensitive("123pasSword")); assertTrue(GlobalConfiguration.isSensitive("PasSword")); assertTrue(GlobalConfiguration.isSensitive("Secret")); assertFalse(GlobalConfiguration.isSensitive("Hello")...
public static boolean isSensitive(String key) { Preconditions.checkNotNull(key, "key is null"); final String keyInLower = key.toLowerCase(); for (String hideKey : SENSITIVE_KEYS) { if (keyInLower.length() >= hideKey.length() && keyInLower.contains(hideKey)) { return true; } } return false; }
GlobalConfiguration { public static boolean isSensitive(String key) { Preconditions.checkNotNull(key, "key is null"); final String keyInLower = key.toLowerCase(); for (String hideKey : SENSITIVE_KEYS) { if (keyInLower.length() >= hideKey.length() && keyInLower.contains(hideKey)) { return true; } } return false; } }
GlobalConfiguration { public static boolean isSensitive(String key) { Preconditions.checkNotNull(key, "key is null"); final String keyInLower = key.toLowerCase(); for (String hideKey : SENSITIVE_KEYS) { if (keyInLower.length() >= hideKey.length() && keyInLower.contains(hideKey)) { return true; } } return false; } priva...
GlobalConfiguration { public static boolean isSensitive(String key) { Preconditions.checkNotNull(key, "key is null"); final String keyInLower = key.toLowerCase(); for (String hideKey : SENSITIVE_KEYS) { if (keyInLower.length() >= hideKey.length() && keyInLower.contains(hideKey)) { return true; } } return false; } priva...
GlobalConfiguration { public static boolean isSensitive(String key) { Preconditions.checkNotNull(key, "key is null"); final String keyInLower = key.toLowerCase(); for (String hideKey : SENSITIVE_KEYS) { if (keyInLower.length() >= hideKey.length() && keyInLower.contains(hideKey)) { return true; } } return false; } priva...
@Test public void testFilterModificationException1() { try { final UdfAnalyzer ua = new UdfAnalyzer(FilterFunction.class, FilterMod1.class, "operator", TypeInfoParser.parse("Tuple2<String, String>"), null, null, null, null, true); ua.analyze(); Assert.fail(); } catch (CodeErrorException e) { } }
public boolean analyze() throws CodeAnalyzerException { if (state == STATE_END_OF_ANALYZING) { throw new IllegalStateException("Analyzing is already done."); } boolean discardReturnValues = false; if (isIterableInput) { if (keys1 == null || (keys2 == null && isBinary)) { throw new IllegalArgumentException("This type of...
UdfAnalyzer { public boolean analyze() throws CodeAnalyzerException { if (state == STATE_END_OF_ANALYZING) { throw new IllegalStateException("Analyzing is already done."); } boolean discardReturnValues = false; if (isIterableInput) { if (keys1 == null || (keys2 == null && isBinary)) { throw new IllegalArgumentException...
UdfAnalyzer { public boolean analyze() throws CodeAnalyzerException { if (state == STATE_END_OF_ANALYZING) { throw new IllegalStateException("Analyzing is already done."); } boolean discardReturnValues = false; if (isIterableInput) { if (keys1 == null || (keys2 == null && isBinary)) { throw new IllegalArgumentException...
UdfAnalyzer { public boolean analyze() throws CodeAnalyzerException { if (state == STATE_END_OF_ANALYZING) { throw new IllegalStateException("Analyzing is already done."); } boolean discardReturnValues = false; if (isIterableInput) { if (keys1 == null || (keys2 == null && isBinary)) { throw new IllegalArgumentException...
UdfAnalyzer { public boolean analyze() throws CodeAnalyzerException { if (state == STATE_END_OF_ANALYZING) { throw new IllegalStateException("Analyzing is already done."); } boolean discardReturnValues = false; if (isIterableInput) { if (keys1 == null || (keys2 == null && isBinary)) { throw new IllegalArgumentException...
@Test public void testFilterModificationException2() { try { final UdfAnalyzer ua = new UdfAnalyzer(FilterFunction.class, FilterMod2.class, "operator", TypeInfoParser.parse("Tuple2<String, String>"), null, null, null, null, true); ua.analyze(); Assert.fail(); } catch (CodeErrorException e) { } }
public boolean analyze() throws CodeAnalyzerException { if (state == STATE_END_OF_ANALYZING) { throw new IllegalStateException("Analyzing is already done."); } boolean discardReturnValues = false; if (isIterableInput) { if (keys1 == null || (keys2 == null && isBinary)) { throw new IllegalArgumentException("This type of...
UdfAnalyzer { public boolean analyze() throws CodeAnalyzerException { if (state == STATE_END_OF_ANALYZING) { throw new IllegalStateException("Analyzing is already done."); } boolean discardReturnValues = false; if (isIterableInput) { if (keys1 == null || (keys2 == null && isBinary)) { throw new IllegalArgumentException...
UdfAnalyzer { public boolean analyze() throws CodeAnalyzerException { if (state == STATE_END_OF_ANALYZING) { throw new IllegalStateException("Analyzing is already done."); } boolean discardReturnValues = false; if (isIterableInput) { if (keys1 == null || (keys2 == null && isBinary)) { throw new IllegalArgumentException...
UdfAnalyzer { public boolean analyze() throws CodeAnalyzerException { if (state == STATE_END_OF_ANALYZING) { throw new IllegalStateException("Analyzing is already done."); } boolean discardReturnValues = false; if (isIterableInput) { if (keys1 == null || (keys2 == null && isBinary)) { throw new IllegalArgumentException...
UdfAnalyzer { public boolean analyze() throws CodeAnalyzerException { if (state == STATE_END_OF_ANALYZING) { throw new IllegalStateException("Analyzing is already done."); } boolean discardReturnValues = false; if (isIterableInput) { if (keys1 == null || (keys2 == null && isBinary)) { throw new IllegalArgumentException...
@Test public void testArrayToString() { double[] array = {1.0}; String controlString = StringUtils.arrayToString(array); assertEquals("[1.0]", controlString); }
public static String arrayToString(Object array) { if (array == null) { throw new NullPointerException(); } if (array instanceof int[]) { return Arrays.toString((int[]) array); } if (array instanceof long[]) { return Arrays.toString((long[]) array); } if (array instanceof Object[]) { return Arrays.toString((Object[]) a...
StringUtils { public static String arrayToString(Object array) { if (array == null) { throw new NullPointerException(); } if (array instanceof int[]) { return Arrays.toString((int[]) array); } if (array instanceof long[]) { return Arrays.toString((long[]) array); } if (array instanceof Object[]) { return Arrays.toStrin...
StringUtils { public static String arrayToString(Object array) { if (array == null) { throw new NullPointerException(); } if (array instanceof int[]) { return Arrays.toString((int[]) array); } if (array instanceof long[]) { return Arrays.toString((long[]) array); } if (array instanceof Object[]) { return Arrays.toStrin...
StringUtils { public static String arrayToString(Object array) { if (array == null) { throw new NullPointerException(); } if (array instanceof int[]) { return Arrays.toString((int[]) array); } if (array instanceof long[]) { return Arrays.toString((long[]) array); } if (array instanceof Object[]) { return Arrays.toStrin...
StringUtils { public static String arrayToString(Object array) { if (array == null) { throw new NullPointerException(); } if (array instanceof int[]) { return Arrays.toString((int[]) array); } if (array instanceof long[]) { return Arrays.toString((long[]) array); } if (array instanceof Object[]) { return Arrays.toStrin...
@Test public void testResourcesForChainedOperators() throws Exception { ResourceSpec resource1 = ResourceSpec.newBuilder().setCpuCores(0.1).setHeapMemoryInMB(100).build(); ResourceSpec resource2 = ResourceSpec.newBuilder().setCpuCores(0.2).setHeapMemoryInMB(200).build(); ResourceSpec resource3 = ResourceSpec.newBuilder...
public JobGraph compileJobGraph(OptimizedPlan program) { return compileJobGraph(program, null); }
JobGraphGenerator implements Visitor<PlanNode> { public JobGraph compileJobGraph(OptimizedPlan program) { return compileJobGraph(program, null); } }
JobGraphGenerator implements Visitor<PlanNode> { public JobGraph compileJobGraph(OptimizedPlan program) { return compileJobGraph(program, null); } JobGraphGenerator(); JobGraphGenerator(Configuration config); }
JobGraphGenerator implements Visitor<PlanNode> { public JobGraph compileJobGraph(OptimizedPlan program) { return compileJobGraph(program, null); } JobGraphGenerator(); JobGraphGenerator(Configuration config); JobGraph compileJobGraph(OptimizedPlan program); JobGraph compileJobGraph(OptimizedPlan program, JobID jobId);...
JobGraphGenerator implements Visitor<PlanNode> { public JobGraph compileJobGraph(OptimizedPlan program) { return compileJobGraph(program, null); } JobGraphGenerator(); JobGraphGenerator(Configuration config); JobGraph compileJobGraph(OptimizedPlan program); JobGraph compileJobGraph(OptimizedPlan program, JobID jobId);...
@Test public void testCompare() throws Exception { AbstractID id1 = new AbstractID(0, 0); AbstractID id2 = new AbstractID(1, 0); AbstractID id3 = new AbstractID(0, 1); AbstractID id4 = new AbstractID(-1, 0); AbstractID id5 = new AbstractID(0, -1); AbstractID id6 = new AbstractID(-1, -1); AbstractID id7 = new AbstractID...
@Override public int compareTo(AbstractID o) { int diff1 = Long.compare(this.upperPart, o.upperPart); int diff2 = Long.compare(this.lowerPart, o.lowerPart); return diff1 == 0 ? diff2 : diff1; }
AbstractID implements Comparable<AbstractID>, java.io.Serializable { @Override public int compareTo(AbstractID o) { int diff1 = Long.compare(this.upperPart, o.upperPart); int diff2 = Long.compare(this.lowerPart, o.lowerPart); return diff1 == 0 ? diff2 : diff1; } }
AbstractID implements Comparable<AbstractID>, java.io.Serializable { @Override public int compareTo(AbstractID o) { int diff1 = Long.compare(this.upperPart, o.upperPart); int diff2 = Long.compare(this.lowerPart, o.lowerPart); return diff1 == 0 ? diff2 : diff1; } AbstractID(byte[] bytes); AbstractID(long lowerPart, lon...
AbstractID implements Comparable<AbstractID>, java.io.Serializable { @Override public int compareTo(AbstractID o) { int diff1 = Long.compare(this.upperPart, o.upperPart); int diff2 = Long.compare(this.lowerPart, o.lowerPart); return diff1 == 0 ? diff2 : diff1; } AbstractID(byte[] bytes); AbstractID(long lowerPart, lon...
AbstractID implements Comparable<AbstractID>, java.io.Serializable { @Override public int compareTo(AbstractID o) { int diff1 = Long.compare(this.upperPart, o.upperPart); int diff2 = Long.compare(this.lowerPart, o.lowerPart); return diff1 == 0 ? diff2 : diff1; } AbstractID(byte[] bytes); AbstractID(long lowerPart, lon...
@Test public void testSetCurrentLowWatermark() { WatermarkGauge metric1 = new WatermarkGauge(); WatermarkGauge metric2 = new WatermarkGauge(); MinWatermarkGauge metric = new MinWatermarkGauge(metric1, metric2); Assert.assertEquals(Long.MIN_VALUE, metric.getValue().longValue()); metric1.setCurrentWatermark(1); Assert.as...
@Override public Long getValue() { return Math.min(watermarkGauge1.getValue(), watermarkGauge2.getValue()); }
MinWatermarkGauge implements Gauge<Long> { @Override public Long getValue() { return Math.min(watermarkGauge1.getValue(), watermarkGauge2.getValue()); } }
MinWatermarkGauge implements Gauge<Long> { @Override public Long getValue() { return Math.min(watermarkGauge1.getValue(), watermarkGauge2.getValue()); } MinWatermarkGauge(WatermarkGauge watermarkGauge1, WatermarkGauge watermarkGauge2); }
MinWatermarkGauge implements Gauge<Long> { @Override public Long getValue() { return Math.min(watermarkGauge1.getValue(), watermarkGauge2.getValue()); } MinWatermarkGauge(WatermarkGauge watermarkGauge1, WatermarkGauge watermarkGauge2); @Override Long getValue(); }
MinWatermarkGauge implements Gauge<Long> { @Override public Long getValue() { return Math.min(watermarkGauge1.getValue(), watermarkGauge2.getValue()); } MinWatermarkGauge(WatermarkGauge watermarkGauge1, WatermarkGauge watermarkGauge2); @Override Long getValue(); }
@Test public void testStateBackendLoadingAndClosing() throws Exception { Configuration taskManagerConfig = new Configuration(); taskManagerConfig.setString(CheckpointingOptions.STATE_BACKEND, TestMemoryStateBackendFactory.class.getName()); StreamConfig cfg = new StreamConfig(new Configuration()); cfg.setStateKeySeriali...
public String getName() { return getEnvironment().getTaskInfo().getTaskNameWithSubtasks(); }
StreamTask extends AbstractInvokable implements AsyncExceptionHandler { public String getName() { return getEnvironment().getTaskInfo().getTaskNameWithSubtasks(); } }
StreamTask extends AbstractInvokable implements AsyncExceptionHandler { public String getName() { return getEnvironment().getTaskInfo().getTaskNameWithSubtasks(); } protected StreamTask(Environment env); protected StreamTask( Environment environment, @Nullable ProcessingTimeService timeProvider); }
StreamTask extends AbstractInvokable implements AsyncExceptionHandler { public String getName() { return getEnvironment().getTaskInfo().getTaskNameWithSubtasks(); } protected StreamTask(Environment env); protected StreamTask( Environment environment, @Nullable ProcessingTimeService timeProvider); StreamTaskStat...
StreamTask extends AbstractInvokable implements AsyncExceptionHandler { public String getName() { return getEnvironment().getTaskInfo().getTaskNameWithSubtasks(); } protected StreamTask(Environment env); protected StreamTask( Environment environment, @Nullable ProcessingTimeService timeProvider); StreamTaskStat...
@Test public void testStateBackendClosingOnFailure() throws Exception { Configuration taskManagerConfig = new Configuration(); taskManagerConfig.setString(CheckpointingOptions.STATE_BACKEND, TestMemoryStateBackendFactory.class.getName()); StreamConfig cfg = new StreamConfig(new Configuration()); cfg.setStateKeySerializ...
public String getName() { return getEnvironment().getTaskInfo().getTaskNameWithSubtasks(); }
StreamTask extends AbstractInvokable implements AsyncExceptionHandler { public String getName() { return getEnvironment().getTaskInfo().getTaskNameWithSubtasks(); } }
StreamTask extends AbstractInvokable implements AsyncExceptionHandler { public String getName() { return getEnvironment().getTaskInfo().getTaskNameWithSubtasks(); } protected StreamTask(Environment env); protected StreamTask( Environment environment, @Nullable ProcessingTimeService timeProvider); }
StreamTask extends AbstractInvokable implements AsyncExceptionHandler { public String getName() { return getEnvironment().getTaskInfo().getTaskNameWithSubtasks(); } protected StreamTask(Environment env); protected StreamTask( Environment environment, @Nullable ProcessingTimeService timeProvider); StreamTaskStat...
StreamTask extends AbstractInvokable implements AsyncExceptionHandler { public String getName() { return getEnvironment().getTaskInfo().getTaskNameWithSubtasks(); } protected StreamTask(Environment env); protected StreamTask( Environment environment, @Nullable ProcessingTimeService timeProvider); StreamTaskStat...
@Test public void testRunWithContextClassLoaderRunnable() throws Exception { final ClassLoader aPrioriContextClassLoader = Thread.currentThread().getContextClassLoader(); try { final ClassLoader original = new URLClassLoader(new URL[0]); final ClassLoader temp = new URLClassLoader(new URL[0]); Thread.currentThread().se...
public static <E extends Throwable> void withContextClassLoader( final ClassLoader cl, final ThrowingRunnable<E> r) throws E { final Thread currentThread = Thread.currentThread(); final ClassLoader oldClassLoader = currentThread.getContextClassLoader(); try { currentThread.setContextClassLoader(cl); r.run(); } finally ...
LambdaUtil { public static <E extends Throwable> void withContextClassLoader( final ClassLoader cl, final ThrowingRunnable<E> r) throws E { final Thread currentThread = Thread.currentThread(); final ClassLoader oldClassLoader = currentThread.getContextClassLoader(); try { currentThread.setContextClassLoader(cl); r.run(...
LambdaUtil { public static <E extends Throwable> void withContextClassLoader( final ClassLoader cl, final ThrowingRunnable<E> r) throws E { final Thread currentThread = Thread.currentThread(); final ClassLoader oldClassLoader = currentThread.getContextClassLoader(); try { currentThread.setContextClassLoader(cl); r.run(...
LambdaUtil { public static <E extends Throwable> void withContextClassLoader( final ClassLoader cl, final ThrowingRunnable<E> r) throws E { final Thread currentThread = Thread.currentThread(); final ClassLoader oldClassLoader = currentThread.getContextClassLoader(); try { currentThread.setContextClassLoader(cl); r.run(...
LambdaUtil { public static <E extends Throwable> void withContextClassLoader( final ClassLoader cl, final ThrowingRunnable<E> r) throws E { final Thread currentThread = Thread.currentThread(); final ClassLoader oldClassLoader = currentThread.getContextClassLoader(); try { currentThread.setContextClassLoader(cl); r.run(...
@Test(timeout = 10000) public void testScheduleAtFixedRate() throws Exception { final Object lock = new Object(); final AtomicReference<Throwable> errorRef = new AtomicReference<>(); final long period = 10L; final int countDown = 3; final SystemProcessingTimeService timer = new SystemProcessingTimeService( new Referenc...
@Override public ScheduledFuture<?> scheduleAtFixedRate(ProcessingTimeCallback callback, long initialDelay, long period) { long nextTimestamp = getCurrentProcessingTime() + initialDelay; try { return timerService.scheduleAtFixedRate( new RepeatedTriggerTask(status, task, checkpointLock, callback, nextTimestamp, period)...
SystemProcessingTimeService extends ProcessingTimeService { @Override public ScheduledFuture<?> scheduleAtFixedRate(ProcessingTimeCallback callback, long initialDelay, long period) { long nextTimestamp = getCurrentProcessingTime() + initialDelay; try { return timerService.scheduleAtFixedRate( new RepeatedTriggerTask(st...
SystemProcessingTimeService extends ProcessingTimeService { @Override public ScheduledFuture<?> scheduleAtFixedRate(ProcessingTimeCallback callback, long initialDelay, long period) { long nextTimestamp = getCurrentProcessingTime() + initialDelay; try { return timerService.scheduleAtFixedRate( new RepeatedTriggerTask(st...
SystemProcessingTimeService extends ProcessingTimeService { @Override public ScheduledFuture<?> scheduleAtFixedRate(ProcessingTimeCallback callback, long initialDelay, long period) { long nextTimestamp = getCurrentProcessingTime() + initialDelay; try { return timerService.scheduleAtFixedRate( new RepeatedTriggerTask(st...
SystemProcessingTimeService extends ProcessingTimeService { @Override public ScheduledFuture<?> scheduleAtFixedRate(ProcessingTimeCallback callback, long initialDelay, long period) { long nextTimestamp = getCurrentProcessingTime() + initialDelay; try { return timerService.scheduleAtFixedRate( new RepeatedTriggerTask(st...
@Test public void testExceptionReporting() throws InterruptedException { final AtomicBoolean exceptionWasThrown = new AtomicBoolean(false); final OneShotLatch latch = new OneShotLatch(); final Object lock = new Object(); ProcessingTimeService timeServiceProvider = new SystemProcessingTimeService( new AsyncExceptionHand...
@Override public ScheduledFuture<?> registerTimer(long timestamp, ProcessingTimeCallback target) { long delay = Math.max(timestamp - getCurrentProcessingTime(), 0); try { return timerService.schedule( new TriggerTask(status, task, checkpointLock, target, timestamp), delay, TimeUnit.MILLISECONDS); } catch (RejectedExecu...
SystemProcessingTimeService extends ProcessingTimeService { @Override public ScheduledFuture<?> registerTimer(long timestamp, ProcessingTimeCallback target) { long delay = Math.max(timestamp - getCurrentProcessingTime(), 0); try { return timerService.schedule( new TriggerTask(status, task, checkpointLock, target, times...
SystemProcessingTimeService extends ProcessingTimeService { @Override public ScheduledFuture<?> registerTimer(long timestamp, ProcessingTimeCallback target) { long delay = Math.max(timestamp - getCurrentProcessingTime(), 0); try { return timerService.schedule( new TriggerTask(status, task, checkpointLock, target, times...
SystemProcessingTimeService extends ProcessingTimeService { @Override public ScheduledFuture<?> registerTimer(long timestamp, ProcessingTimeCallback target) { long delay = Math.max(timestamp - getCurrentProcessingTime(), 0); try { return timerService.schedule( new TriggerTask(status, task, checkpointLock, target, times...
SystemProcessingTimeService extends ProcessingTimeService { @Override public ScheduledFuture<?> registerTimer(long timestamp, ProcessingTimeCallback target) { long delay = Math.max(timestamp - getCurrentProcessingTime(), 0); try { return timerService.schedule( new TriggerTask(status, task, checkpointLock, target, times...
@Test public void testExceptionReportingScheduleAtFixedRate() throws InterruptedException { final AtomicBoolean exceptionWasThrown = new AtomicBoolean(false); final OneShotLatch latch = new OneShotLatch(); final Object lock = new Object(); ProcessingTimeService timeServiceProvider = new SystemProcessingTimeService( new...
@Override public ScheduledFuture<?> scheduleAtFixedRate(ProcessingTimeCallback callback, long initialDelay, long period) { long nextTimestamp = getCurrentProcessingTime() + initialDelay; try { return timerService.scheduleAtFixedRate( new RepeatedTriggerTask(status, task, checkpointLock, callback, nextTimestamp, period)...
SystemProcessingTimeService extends ProcessingTimeService { @Override public ScheduledFuture<?> scheduleAtFixedRate(ProcessingTimeCallback callback, long initialDelay, long period) { long nextTimestamp = getCurrentProcessingTime() + initialDelay; try { return timerService.scheduleAtFixedRate( new RepeatedTriggerTask(st...
SystemProcessingTimeService extends ProcessingTimeService { @Override public ScheduledFuture<?> scheduleAtFixedRate(ProcessingTimeCallback callback, long initialDelay, long period) { long nextTimestamp = getCurrentProcessingTime() + initialDelay; try { return timerService.scheduleAtFixedRate( new RepeatedTriggerTask(st...
SystemProcessingTimeService extends ProcessingTimeService { @Override public ScheduledFuture<?> scheduleAtFixedRate(ProcessingTimeCallback callback, long initialDelay, long period) { long nextTimestamp = getCurrentProcessingTime() + initialDelay; try { return timerService.scheduleAtFixedRate( new RepeatedTriggerTask(st...
SystemProcessingTimeService extends ProcessingTimeService { @Override public ScheduledFuture<?> scheduleAtFixedRate(ProcessingTimeCallback callback, long initialDelay, long period) { long nextTimestamp = getCurrentProcessingTime() + initialDelay; try { return timerService.scheduleAtFixedRate( new RepeatedTriggerTask(st...
@Test public void testShutdownServiceUninterruptible() { final Object lock = new Object(); final OneShotLatch blockUntilTriggered = new OneShotLatch(); final AtomicBoolean timerFinished = new AtomicBoolean(false); final SystemProcessingTimeService timeService = createBlockingSystemProcessingTimeService(lock, blockUntil...
@Override public boolean shutdownServiceUninterruptible(long timeoutMs) { final Deadline deadline = Deadline.fromNow(Duration.ofMillis(timeoutMs)); boolean shutdownComplete = false; boolean receivedInterrupt = false; do { try { shutdownComplete = shutdownAndAwaitPending(deadline.timeLeft().toMillis(), TimeUnit.MILLISEC...
SystemProcessingTimeService extends ProcessingTimeService { @Override public boolean shutdownServiceUninterruptible(long timeoutMs) { final Deadline deadline = Deadline.fromNow(Duration.ofMillis(timeoutMs)); boolean shutdownComplete = false; boolean receivedInterrupt = false; do { try { shutdownComplete = shutdownAndAw...
SystemProcessingTimeService extends ProcessingTimeService { @Override public boolean shutdownServiceUninterruptible(long timeoutMs) { final Deadline deadline = Deadline.fromNow(Duration.ofMillis(timeoutMs)); boolean shutdownComplete = false; boolean receivedInterrupt = false; do { try { shutdownComplete = shutdownAndAw...
SystemProcessingTimeService extends ProcessingTimeService { @Override public boolean shutdownServiceUninterruptible(long timeoutMs) { final Deadline deadline = Deadline.fromNow(Duration.ofMillis(timeoutMs)); boolean shutdownComplete = false; boolean receivedInterrupt = false; do { try { shutdownComplete = shutdownAndAw...
SystemProcessingTimeService extends ProcessingTimeService { @Override public boolean shutdownServiceUninterruptible(long timeoutMs) { final Deadline deadline = Deadline.fromNow(Duration.ofMillis(timeoutMs)); boolean shutdownComplete = false; boolean receivedInterrupt = false; do { try { shutdownComplete = shutdownAndAw...
@Test public void testRunWithContextClassLoaderSupplier() throws Exception { final ClassLoader aPrioriContextClassLoader = Thread.currentThread().getContextClassLoader(); try { final ClassLoader original = new URLClassLoader(new URL[0]); final ClassLoader temp = new URLClassLoader(new URL[0]); Thread.currentThread().se...
public static <E extends Throwable> void withContextClassLoader( final ClassLoader cl, final ThrowingRunnable<E> r) throws E { final Thread currentThread = Thread.currentThread(); final ClassLoader oldClassLoader = currentThread.getContextClassLoader(); try { currentThread.setContextClassLoader(cl); r.run(); } finally ...
LambdaUtil { public static <E extends Throwable> void withContextClassLoader( final ClassLoader cl, final ThrowingRunnable<E> r) throws E { final Thread currentThread = Thread.currentThread(); final ClassLoader oldClassLoader = currentThread.getContextClassLoader(); try { currentThread.setContextClassLoader(cl); r.run(...
LambdaUtil { public static <E extends Throwable> void withContextClassLoader( final ClassLoader cl, final ThrowingRunnable<E> r) throws E { final Thread currentThread = Thread.currentThread(); final ClassLoader oldClassLoader = currentThread.getContextClassLoader(); try { currentThread.setContextClassLoader(cl); r.run(...
LambdaUtil { public static <E extends Throwable> void withContextClassLoader( final ClassLoader cl, final ThrowingRunnable<E> r) throws E { final Thread currentThread = Thread.currentThread(); final ClassLoader oldClassLoader = currentThread.getContextClassLoader(); try { currentThread.setContextClassLoader(cl); r.run(...
LambdaUtil { public static <E extends Throwable> void withContextClassLoader( final ClassLoader cl, final ThrowingRunnable<E> r) throws E { final Thread currentThread = Thread.currentThread(); final ClassLoader oldClassLoader = currentThread.getContextClassLoader(); try { currentThread.setContextClassLoader(cl); r.run(...
@Test public void testCancelAndCleanup() throws Exception { OperatorSnapshotFutures operatorSnapshotResult = new OperatorSnapshotFutures(); operatorSnapshotResult.cancel(); KeyedStateHandle keyedManagedStateHandle = mock(KeyedStateHandle.class); SnapshotResult<KeyedStateHandle> keyedStateManagedResult = SnapshotResult....
public void cancel() throws Exception { Exception exception = null; try { StateUtil.discardStateFuture(getKeyedStateManagedFuture()); } catch (Exception e) { exception = new Exception("Could not properly cancel managed keyed state future.", e); } try { StateUtil.discardStateFuture(getOperatorStateManagedFuture()); } ca...
OperatorSnapshotFutures { public void cancel() throws Exception { Exception exception = null; try { StateUtil.discardStateFuture(getKeyedStateManagedFuture()); } catch (Exception e) { exception = new Exception("Could not properly cancel managed keyed state future.", e); } try { StateUtil.discardStateFuture(getOperatorS...
OperatorSnapshotFutures { public void cancel() throws Exception { Exception exception = null; try { StateUtil.discardStateFuture(getKeyedStateManagedFuture()); } catch (Exception e) { exception = new Exception("Could not properly cancel managed keyed state future.", e); } try { StateUtil.discardStateFuture(getOperatorS...
OperatorSnapshotFutures { public void cancel() throws Exception { Exception exception = null; try { StateUtil.discardStateFuture(getKeyedStateManagedFuture()); } catch (Exception e) { exception = new Exception("Could not properly cancel managed keyed state future.", e); } try { StateUtil.discardStateFuture(getOperatorS...
OperatorSnapshotFutures { public void cancel() throws Exception { Exception exception = null; try { StateUtil.discardStateFuture(getKeyedStateManagedFuture()); } catch (Exception e) { exception = new Exception("Could not properly cancel managed keyed state future.", e); } try { StateUtil.discardStateFuture(getOperatorS...