mirror of
https://github.com/apache/zeppelin
synced 2026-05-24 09:38:26 +00:00
rename fct hub -> ZeppelinHub
This commit is contained in:
parent
4c47e43116
commit
27a4042e12
2 changed files with 9 additions and 9 deletions
|
|
@ -173,14 +173,14 @@ public class ZeppelinhubClient {
|
|||
LOG.error("Message OP from ZeppelinHub isn't string {}", hubMsg.op);
|
||||
return;
|
||||
}
|
||||
if (ZeppelinhubUtils.isHubOp(op)) {
|
||||
handleHubOpMsg(ZeppelinhubUtils.stringToHubOp(op), hubMsg, message);
|
||||
if (ZeppelinhubUtils.isZeppelinHubOp(op)) {
|
||||
handleZeppelinHubOpMsg(ZeppelinhubUtils.toZeppelinHubOp(op), hubMsg, message);
|
||||
} else if (ZeppelinhubUtils.isZeppelinOp(op)) {
|
||||
forwardToZeppelin(ZeppelinhubUtils.stringToZeppelinOp(op), hubMsg);
|
||||
forwardToZeppelin(ZeppelinhubUtils.toZeppelinOp(op), hubMsg);
|
||||
}
|
||||
}
|
||||
|
||||
private void handleHubOpMsg(ZeppelinHubOp op, ZeppelinhubMessage hubMsg, String msg) {
|
||||
private void handleZeppelinHubOpMsg(ZeppelinHubOp op, ZeppelinhubMessage hubMsg, String msg) {
|
||||
if (op == null || msg.equals(ZeppelinhubMessage.EMPTY)) {
|
||||
LOG.error("Cannot handle empty op or msg");
|
||||
return;
|
||||
|
|
|
|||
|
|
@ -68,7 +68,7 @@ public class ZeppelinhubUtils {
|
|||
.serialize();
|
||||
}
|
||||
|
||||
public static ZeppelinHubOp stringToHubOp(String text) {
|
||||
public static ZeppelinHubOp toZeppelinHubOp(String text) {
|
||||
ZeppelinHubOp hubOp = null;
|
||||
try {
|
||||
hubOp = ZeppelinHubOp.valueOf(text);
|
||||
|
|
@ -78,11 +78,11 @@ public class ZeppelinhubUtils {
|
|||
return hubOp;
|
||||
}
|
||||
|
||||
public static boolean isHubOp(String text) {
|
||||
return (stringToHubOp(text) != null);
|
||||
public static boolean isZeppelinHubOp(String text) {
|
||||
return (toZeppelinHubOp(text) != null);
|
||||
}
|
||||
|
||||
public static Message.OP stringToZeppelinOp(String text) {
|
||||
public static Message.OP toZeppelinOp(String text) {
|
||||
Message.OP zeppelinOp = null;
|
||||
try {
|
||||
zeppelinOp = Message.OP.valueOf(text);
|
||||
|
|
@ -93,6 +93,6 @@ public class ZeppelinhubUtils {
|
|||
}
|
||||
|
||||
public static boolean isZeppelinOp(String text) {
|
||||
return (stringToZeppelinOp(text) != null);
|
||||
return (toZeppelinOp(text) != null);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue