-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ISSUE-242 Added schema version lifecycle statemachine APIs for users …
…to add any custom states. - Added APIs required for clients including UI to get statemachine information and transition APIs. - Changed details column type to blob in schema_version_state table which gives mroe freedom to put whatever content by custom state implementors.
- Loading branch information
Showing
27 changed files
with
1,128 additions
and
393 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
169 changes: 105 additions & 64 deletions
169
.../src/main/java/com/hortonworks/registries/schemaregistry/client/SchemaRegistryClient.java
Large diffs are not rendered by default.
Oops, something went wrong.
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
88 changes: 88 additions & 0 deletions
88
...java/com/hortonworks/registries/schemaregistry/state/BaseSchemaVersionLifecycleState.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,88 @@ | ||
/* | ||
* Copyright 2016 Hortonworks. | ||
* <p> | ||
* 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 | ||
* <p> | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* <p> | ||
* 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.hortonworks.registries.schemaregistry.state; | ||
|
||
import com.fasterxml.jackson.annotation.JsonIgnoreProperties; | ||
|
||
import java.io.Serializable; | ||
|
||
/** | ||
* | ||
*/ | ||
@JsonIgnoreProperties(ignoreUnknown = true) | ||
public class BaseSchemaVersionLifecycleState implements SchemaVersionLifecycleState, Serializable { | ||
|
||
private static final long serialVersionUID = 7503502751825893763L; | ||
|
||
private String name; | ||
private byte id; | ||
private String description; | ||
|
||
private BaseSchemaVersionLifecycleState() { | ||
} | ||
|
||
protected BaseSchemaVersionLifecycleState(String name, | ||
byte id, | ||
String description) { | ||
this.name = name; | ||
this.id = id; | ||
this.description = description; | ||
} | ||
|
||
@Override | ||
public Byte getId() { | ||
return id; | ||
} | ||
|
||
@Override | ||
public String getName() { | ||
return name; | ||
} | ||
|
||
@Override | ||
public String getDescription() { | ||
return description; | ||
} | ||
|
||
@Override | ||
public boolean equals(Object o) { | ||
if (this == o) return true; | ||
if (o == null || getClass() != o.getClass()) return false; | ||
|
||
BaseSchemaVersionLifecycleState that = (BaseSchemaVersionLifecycleState) o; | ||
|
||
if (id != that.id) return false; | ||
if (name != null ? !name.equals(that.name) : that.name != null) return false; | ||
return description != null ? description.equals(that.description) : that.description == null; | ||
} | ||
|
||
@Override | ||
public int hashCode() { | ||
int result = name != null ? name.hashCode() : 0; | ||
result = 31 * result + (int) id; | ||
result = 31 * result + (description != null ? description.hashCode() : 0); | ||
return result; | ||
} | ||
|
||
@Override | ||
public String toString() { | ||
return "BaseSchemaVersionLifecycleState{" + | ||
"name='" + name + '\'' + | ||
", id=" + id + | ||
", description='" + description + '\'' + | ||
'}'; | ||
} | ||
} |
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
Oops, something went wrong.