HDFS-16027. Replace abstract methods with default methods in JournalNodeMXBean. (#3018)
Reviewed-by: Ayush Saxena <ayushsaxena@apache.org>
This commit is contained in:
parent
27749ce85d
commit
63392376c9
@ -20,6 +20,7 @@
|
|||||||
import org.apache.hadoop.classification.InterfaceAudience;
|
import org.apache.hadoop.classification.InterfaceAudience;
|
||||||
import org.apache.hadoop.classification.InterfaceStability;
|
import org.apache.hadoop.classification.InterfaceStability;
|
||||||
|
|
||||||
|
import java.util.Collections;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -41,7 +42,9 @@ public interface JournalNodeMXBean {
|
|||||||
*
|
*
|
||||||
* @return colon separated host and port.
|
* @return colon separated host and port.
|
||||||
*/
|
*/
|
||||||
String getHostAndPort();
|
default String getHostAndPort() {
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get list of the clusters of JournalNode's journals
|
* Get list of the clusters of JournalNode's journals
|
||||||
@ -49,12 +52,16 @@ public interface JournalNodeMXBean {
|
|||||||
*
|
*
|
||||||
* @return list of clusters.
|
* @return list of clusters.
|
||||||
*/
|
*/
|
||||||
List<String> getClusterIds();
|
default List<String> getClusterIds() {
|
||||||
|
return Collections.emptyList() ;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets the version of Hadoop.
|
* Gets the version of Hadoop.
|
||||||
*
|
*
|
||||||
* @return the version of Hadoop.
|
* @return the version of Hadoop.
|
||||||
*/
|
*/
|
||||||
String getVersion();
|
default String getVersion() {
|
||||||
|
return "";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user