Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
T
theodolite
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Analyze
Contributor analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Sören Henning
theodolite
Commits
6e61db7a
Commit
6e61db7a
authored
4 years ago
by
Sören Henning
Browse files
Options
Downloads
Patches
Plain Diff
Revert to previous default state backend
parent
ccf3ade9
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!90
Migrate Flink benchmark implementation
Pipeline
#2259
failed
4 years ago
Stage: build
Stage: test
Stage: check
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
theodolite-benchmarks/flink-commons/src/main/java/theodolite/commons/flink/StateBackends.java
+9
-4
9 additions, 4 deletions
...src/main/java/theodolite/commons/flink/StateBackends.java
with
9 additions
and
4 deletions
theodolite-benchmarks/flink-commons/src/main/java/theodolite/commons/flink/StateBackends.java
+
9
−
4
View file @
6e61db7a
...
...
@@ -17,8 +17,9 @@ public final class StateBackends {
public
static
final
String
STATE_BACKEND_TYPE_MEMORY
=
"memory"
;
public
static
final
String
STATE_BACKEND_TYPE_FILESYSTEM
=
"filesystem"
;
public
static
final
String
STATE_BACKEND_TYPE_ROCKSDB
=
"rocksdb"
;
public
static
final
String
STATE_BACKEND_TYPE_DEFAULT
=
STATE_BACKEND_TYPE_ROCKSDB
;
public
static
final
String
DEFAULT_STATE_BACKEND_PATH
=
"/opt/flink/statebackend"
;
// public static final String STATE_BACKEND_TYPE_DEFAULT = STATE_BACKEND_TYPE_ROCKSDB;
public
static
final
String
STATE_BACKEND_TYPE_DEFAULT
=
STATE_BACKEND_TYPE_MEMORY
;
public
static
final
String
DEFAULT_STATE_BACKEND_PATH
=
"file:///opt/flink/statebackend"
;
private
static
final
Logger
LOGGER
=
LoggerFactory
.
getLogger
(
StateBackends
.
class
);
...
...
@@ -35,7 +36,9 @@ public final class StateBackends {
* {@code StateBackendFactory#STATE_BACKEND_TYPE_ROCKSDB} is the default.
*/
public
static
StateBackend
fromConfiguration
(
final
Configuration
configuration
)
{
switch
(
configuration
.
getString
(
ConfigurationKeys
.
FLINK_STATE_BACKEND
))
{
final
String
stateBackendType
=
configuration
.
getString
(
ConfigurationKeys
.
FLINK_STATE_BACKEND
,
STATE_BACKEND_TYPE_DEFAULT
);
switch
(
stateBackendType
)
{
case
STATE_BACKEND_TYPE_MEMORY:
final
int
memoryStateBackendSize
=
configuration
.
getInt
(
ConfigurationKeys
.
FLINK_STATE_BACKEND_MEMORY_SIZE
,
...
...
@@ -47,7 +50,6 @@ public final class StateBackends {
DEFAULT_STATE_BACKEND_PATH
);
return
new
FsStateBackend
(
stateBackendPath
);
case
STATE_BACKEND_TYPE_ROCKSDB:
default
:
final
String
stateBackendPath2
=
configuration
.
getString
(
ConfigurationKeys
.
FLINK_STATE_BACKEND_PATH
,
DEFAULT_STATE_BACKEND_PATH
);
...
...
@@ -57,6 +59,9 @@ public final class StateBackends {
LOGGER
.
error
(
"Cannot create RocksDB state backend."
,
e
);
throw
new
IllegalStateException
(
e
);
}
default
:
throw
new
IllegalArgumentException
(
"Unsupported state backend '"
+
stateBackendType
+
"' configured."
);
}
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment