This repository has been archived by the owner on Mar 3, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 594
Change AuroraController to an interface #1672
Merged
billonahill
merged 5 commits into
apache:master
from
billonahill:billg/aurora_controller_interface
Jan 20, 2017
Merged
Changes from 1 commit
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
2d52e6c
Change AuroraController to an interface
e4e763d
Change AuroraController to an interface
b4cd078
Removed auroraFilename from the createJob method
a89f379
Added AuroraField to clarify usage of auroraProperties
3b06308
Change AuroraCLIController
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
58 changes: 58 additions & 0 deletions
58
heron/schedulers/src/java/com/twitter/heron/scheduler/aurora/AuroraField.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,58 @@ | ||
// Copyright 2016 Twitter. All rights reserved. | ||
// | ||
// Licensed under the Apache License, Version 2.0 (the "License"); | ||
// you may not use this file except in compliance with the License. | ||
// You may obtain a copy of the License at | ||
// | ||
// http://www.apache.org/licenses/LICENSE-2.0 | ||
// | ||
// Unless required by applicable law or agreed to in writing, software | ||
// distributed under the License is distributed on an "AS IS" BASIS, | ||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
// See the License for the specific language governing permissions and | ||
// limitations under the License. | ||
package com.twitter.heron.scheduler.aurora; | ||
|
||
/** | ||
* Field names passed to aurora controllers during job creation | ||
*/ | ||
public enum AuroraField { | ||
CLUSTER, | ||
COMPONENT_JVM_OPTS_IN_BASE64, | ||
COMPONENT_RAMMAP, | ||
CORE_PACKAGE_URI, | ||
CPUS_PER_CONTAINER, | ||
DISK_PER_CONTAINER, | ||
ENVIRON, | ||
HERON_SANDBOX_JAVA_HOME, | ||
INSTANCE_JVM_OPTS_IN_BASE64, | ||
/** | ||
* Previous flag updated to use IS_PRODUCTION instead | ||
* @deprecated remove in future release once config/src/yaml/heron.aurora is updated | ||
*/ | ||
@Deprecated | ||
ISPRODUCTION, | ||
IS_PRODUCTION, | ||
NUM_CONTAINERS, | ||
RAM_PER_CONTAINER, | ||
ROLE, | ||
SANDBOX_EXECUTOR_BINARY, | ||
SANDBOX_INSTANCE_CLASSPATH, | ||
SANDBOX_METRICSMGR_CLASSPATH, | ||
SANDBOX_METRICS_YAML, | ||
SANDBOX_PYTHON_INSTANCE_BINARY, | ||
SANDBOX_SCHEDULER_CLASSPATH, | ||
SANDBOX_SHELL_BINARY, | ||
SANDBOX_STMGR_BINARY, | ||
SANDBOX_SYSTEM_YAML, | ||
SANDBOX_TMASTER_BINARY, | ||
STATEMGR_CONNECTION_STRING, | ||
STATEMGR_ROOT_PATH, | ||
TOPOLOGY_BINARY_FILE, | ||
TOPOLOGY_CLASSPATH, | ||
TOPOLOGY_DEFINITION_FILE, | ||
TOPOLOGY_ID, | ||
TOPOLOGY_NAME, | ||
TOPOLOGY_PACKAGE_TYPE, | ||
TOPOLOGY_PACKAGE_URI | ||
} |
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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
when
containerId
is-1
, the entire job will also be restarted according to hereThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Although not the preferred approach I kept that for backward compatibility, but there's no need to do that since the code will all change in lock step. I've made the change to match behavior to docs.