-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Allow to add proctime column to tables
- Loading branch information
Showing
7 changed files
with
143 additions
and
271 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
74 changes: 74 additions & 0 deletions
74
src/test/java/com/getindata/flink/connector/jdbc/catalog/ElasticCatalogBuilder.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
package com.getindata.flink.connector.jdbc.catalog; | ||
|
||
import java.util.Map; | ||
|
||
public final class ElasticCatalogBuilder { | ||
private ClassLoader userClassLoader; | ||
private String username; | ||
private String password; | ||
private String baseUrl; | ||
private boolean addProctimeColumn; | ||
private IndexFilterResolver indexFilterResolver; | ||
private String catalogName; | ||
private String defaultDatabase; | ||
|
||
private Map<String, String> properties; | ||
|
||
private ElasticCatalogBuilder() { | ||
} | ||
|
||
public static ElasticCatalogBuilder anElasticCatalog() { | ||
return new ElasticCatalogBuilder(); | ||
} | ||
|
||
public ElasticCatalogBuilder userClassLoader(ClassLoader userClassLoader) { | ||
this.userClassLoader = userClassLoader; | ||
return this; | ||
} | ||
|
||
public ElasticCatalogBuilder username(String username) { | ||
this.username = username; | ||
return this; | ||
} | ||
|
||
public ElasticCatalogBuilder password(String password) { | ||
this.password = password; | ||
return this; | ||
} | ||
|
||
public ElasticCatalogBuilder baseUrl(String baseUrl) { | ||
this.baseUrl = baseUrl; | ||
return this; | ||
} | ||
|
||
public ElasticCatalogBuilder addProctimeColumn(boolean addProctimeColumn) { | ||
this.addProctimeColumn = addProctimeColumn; | ||
return this; | ||
} | ||
|
||
public ElasticCatalogBuilder indexFilterResolver(IndexFilterResolver indexFilterResolver) { | ||
this.indexFilterResolver = indexFilterResolver; | ||
return this; | ||
} | ||
|
||
public ElasticCatalogBuilder catalogName(String catalogName) { | ||
this.catalogName = catalogName; | ||
return this; | ||
} | ||
|
||
public ElasticCatalogBuilder defaultDatabase(String defaultDatabase) { | ||
this.defaultDatabase = defaultDatabase; | ||
return this; | ||
} | ||
|
||
|
||
public ElasticCatalogBuilder properties(Map<String, String> properties) { | ||
this.properties = properties; | ||
return this; | ||
} | ||
|
||
public ElasticCatalog build() { | ||
return new ElasticCatalog(userClassLoader, catalogName, defaultDatabase, username, password, baseUrl, | ||
addProctimeColumn, indexFilterResolver, properties); | ||
} | ||
} |
Oops, something went wrong.