diff --git a/.gitignore b/.gitignore
index 428950ba99..d5550364b8 100644
--- a/.gitignore
+++ b/.gitignore
@@ -50,6 +50,10 @@ patchprocess/
hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/package-lock.json
hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/yarn-error.log
+# Ignore files generated by HDDS acceptance tests.
+hadoop-ozone/acceptance-test/docker-compose.log
+hadoop-ozone/acceptance-test/junit-results.xml
+
#robotframework outputs
log.html
output.xml
diff --git a/dev-support/bin/ozone-dist-layout-stitching b/dev-support/bin/ozone-dist-layout-stitching
index be330d5aaa..c30a37d2e5 100755
--- a/dev-support/bin/ozone-dist-layout-stitching
+++ b/dev-support/bin/ozone-dist-layout-stitching
@@ -148,7 +148,7 @@ run copy "${ROOT}/hadoop-ozone/tools/target/hadoop-ozone-tools-${HDDS_VERSION}"
mkdir -p "./share/hadoop/ozonefs"
cp "${ROOT}/hadoop-ozone/ozonefs/target/hadoop-ozone-filesystem-${HDDS_VERSION}.jar" "./share/hadoop/ozonefs/hadoop-ozone-filesystem.jar"
# Optional documentation, could be missing
-cp -r "${ROOT}/hadoop-ozone/docs/target/classes/webapps/docs" ./share/hadoop/ozone/webapps/ksm/
+cp -r "${ROOT}/hadoop-ozone/docs/target/classes/webapps/docs" ./share/hadoop/ozone/webapps/ozoneManager/
cp -r "${ROOT}/hadoop-ozone/docs/target/classes/webapps/docs" ./share/hadoop/hdds/webapps/scm/
diff --git a/hadoop-common-project/hadoop-common/src/main/conf/hadoop-env.sh b/hadoop-common-project/hadoop-common/src/main/conf/hadoop-env.sh
index 6573a81eb5..3826f67a5e 100644
--- a/hadoop-common-project/hadoop-common/src/main/conf/hadoop-env.sh
+++ b/hadoop-common-project/hadoop-common/src/main/conf/hadoop-env.sh
@@ -404,13 +404,13 @@ esac
# export HDFS_DFSROUTER_OPTS=""
###
-# HDFS Key Space Manager specific parameters
+# Ozone Manager specific parameters
###
-# Specify the JVM options to be used when starting the HDFS Key Space Manager.
+# Specify the JVM options to be used when starting the Ozone Manager.
# These options will be appended to the options specified as HADOOP_OPTS
# and therefore may override any similar flags set in HADOOP_OPTS
#
-# export HDFS_KSM_OPTS=""
+# export HDFS_OM_OPTS=""
###
# HDFS StorageContainerManager specific parameters
diff --git a/hadoop-dist/src/main/compose/ozone/docker-compose.yaml b/hadoop-dist/src/main/compose/ozone/docker-compose.yaml
index 512c649e21..bb5e8dd535 100644
--- a/hadoop-dist/src/main/compose/ozone/docker-compose.yaml
+++ b/hadoop-dist/src/main/compose/ozone/docker-compose.yaml
@@ -25,17 +25,17 @@ services:
command: ["/opt/hadoop/bin/ozone","datanode"]
env_file:
- ./docker-config
- ksm:
+ ozoneManager:
image: apache/hadoop-runner
volumes:
- ../../ozone:/opt/hadoop
ports:
- 9874:9874
environment:
- ENSURE_KSM_INITIALIZED: /data/metadata/ksm/current/VERSION
+ ENSURE_OM_INITIALIZED: /data/metadata/ozoneManager/current/VERSION
env_file:
- ./docker-config
- command: ["/opt/hadoop/bin/ozone","ksm"]
+ command: ["/opt/hadoop/bin/ozone","om"]
scm:
image: apache/hadoop-runner
volumes:
diff --git a/hadoop-dist/src/main/compose/ozone/docker-config b/hadoop-dist/src/main/compose/ozone/docker-config
index 632f8701d2..50abb18e1a 100644
--- a/hadoop-dist/src/main/compose/ozone/docker-config
+++ b/hadoop-dist/src/main/compose/ozone/docker-config
@@ -14,7 +14,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-OZONE-SITE.XML_ozone.ksm.address=ksm
+OZONE-SITE.XML_ozone.om.address=ozoneManager
OZONE-SITE.XML_ozone.scm.names=scm
OZONE-SITE.XML_ozone.enabled=True
OZONE-SITE.XML_ozone.scm.datanode.id=/data/datanode.id
diff --git a/hadoop-dist/src/main/compose/ozoneperf/README.md b/hadoop-dist/src/main/compose/ozoneperf/README.md
index a78f208732..527ff418d3 100644
--- a/hadoop-dist/src/main/compose/ozoneperf/README.md
+++ b/hadoop-dist/src/main/compose/ozoneperf/README.md
@@ -67,7 +67,7 @@ http://localhost:9090/graph
Example queries:
```
-Hadoop_KeySpaceManager_NumKeyCommits
-rate(Hadoop_KeySpaceManager_NumKeyCommits[10m])
+Hadoop_OzoneManager_NumKeyCommits
+rate(Hadoop_OzoneManager_NumKeyCommits[10m])
rate(Hadoop_Ozone_BYTES_WRITTEN[10m])
```
diff --git a/hadoop-dist/src/main/compose/ozoneperf/docker-compose.yaml b/hadoop-dist/src/main/compose/ozoneperf/docker-compose.yaml
index 3233c11641..6d1d9cadb3 100644
--- a/hadoop-dist/src/main/compose/ozoneperf/docker-compose.yaml
+++ b/hadoop-dist/src/main/compose/ozoneperf/docker-compose.yaml
@@ -26,7 +26,7 @@ services:
command: ["/opt/hadoop/bin/ozone","datanode"]
env_file:
- ./docker-config
- ksm:
+ ozoneManager:
image: apache/hadoop-runner
volumes:
- ../../ozone:/opt/hadoop
@@ -34,10 +34,10 @@ services:
ports:
- 9874:9874
environment:
- ENSURE_KSM_INITIALIZED: /data/metadata/ksm/current/VERSION
+ ENSURE_OM_INITIALIZED: /data/metadata/ozoneManager/current/VERSION
env_file:
- ./docker-config
- command: ["/opt/hadoop/bin/ozone","ksm"]
+ command: ["/opt/hadoop/bin/ozone","om"]
scm:
image: apache/hadoop-runner
volumes:
diff --git a/hadoop-dist/src/main/compose/ozoneperf/docker-config b/hadoop-dist/src/main/compose/ozoneperf/docker-config
index 2be22a7792..253995014c 100644
--- a/hadoop-dist/src/main/compose/ozoneperf/docker-config
+++ b/hadoop-dist/src/main/compose/ozoneperf/docker-config
@@ -14,7 +14,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-OZONE-SITE.XML_ozone.ksm.address=ksm
+OZONE-SITE.XML_ozone.om.address=ozoneManager
OZONE-SITE.XML_ozone.scm.names=scm
OZONE-SITE.XML_ozone.enabled=True
OZONE-SITE.XML_ozone.scm.datanode.id=/data/datanode.id
diff --git a/hadoop-hdds/common/src/main/java/org/apache/hadoop/hdds/scm/ScmConfigKeys.java b/hadoop-hdds/common/src/main/java/org/apache/hadoop/hdds/scm/ScmConfigKeys.java
index ad326dcb7f..4f1b1c8e2c 100644
--- a/hadoop-hdds/common/src/main/java/org/apache/hadoop/hdds/scm/ScmConfigKeys.java
+++ b/hadoop-hdds/common/src/main/java/org/apache/hadoop/hdds/scm/ScmConfigKeys.java
@@ -94,7 +94,7 @@ public final class ScmConfigKeys {
"ozone.scm.datanode.port";
public static final int OZONE_SCM_DATANODE_PORT_DEFAULT = 9861;
- // OZONE_KSM_PORT_DEFAULT = 9862
+ // OZONE_OM_PORT_DEFAULT = 9862
public static final String OZONE_SCM_BLOCK_CLIENT_PORT_KEY =
"ozone.scm.block.client.port";
public static final int OZONE_SCM_BLOCK_CLIENT_PORT_DEFAULT = 9863;
diff --git a/hadoop-hdds/common/src/main/java/org/apache/hadoop/ozone/OzoneConsts.java b/hadoop-hdds/common/src/main/java/org/apache/hadoop/ozone/OzoneConsts.java
index 08a5ffdb87..4fad5d83a8 100644
--- a/hadoop-hdds/common/src/main/java/org/apache/hadoop/ozone/OzoneConsts.java
+++ b/hadoop-hdds/common/src/main/java/org/apache/hadoop/ozone/OzoneConsts.java
@@ -93,7 +93,7 @@ public final class OzoneConsts {
public static final String BLOCK_DB = "block.db";
public static final String OPEN_CONTAINERS_DB = "openContainers.db";
public static final String DELETED_BLOCK_DB = "deletedBlock.db";
- public static final String KSM_DB_NAME = "ksm.db";
+ public static final String OM_DB_NAME = "om.db";
/**
* Supports Bucket Versioning.
@@ -119,13 +119,13 @@ public static Versioning getVersioning(boolean versioning) {
public static final String OPEN_KEY_ID_DELIMINATOR = "#";
/**
- * KSM LevelDB prefixes.
+ * OM LevelDB prefixes.
*
- * KSM DB stores metadata as KV pairs with certain prefixes,
+ * OM DB stores metadata as KV pairs with certain prefixes,
* prefix is used to improve the performance to get related
* metadata.
*
- * KSM DB Schema:
+ * OM DB Schema:
* ----------------------------------------------------------
* | KEY | VALUE |
* ----------------------------------------------------------
@@ -140,13 +140,13 @@ public static Versioning getVersioning(boolean versioning) {
* | #deleting#/volumeName/bucketName/keyName | KeyInfo |
* ----------------------------------------------------------
*/
- public static final String KSM_VOLUME_PREFIX = "/#";
- public static final String KSM_BUCKET_PREFIX = "/#";
- public static final String KSM_KEY_PREFIX = "/";
- public static final String KSM_USER_PREFIX = "$";
+ public static final String OM_VOLUME_PREFIX = "/#";
+ public static final String OM_BUCKET_PREFIX = "/#";
+ public static final String OM_KEY_PREFIX = "/";
+ public static final String OM_USER_PREFIX = "$";
/**
- * Max KSM Quota size of 1024 PB.
+ * Max OM Quota size of 1024 PB.
*/
public static final long MAX_QUOTA_IN_BYTES = 1024L * 1024 * TB;
@@ -168,9 +168,9 @@ public static Versioning getVersioning(boolean versioning) {
public static final int INVALID_PORT = -1;
- // The ServiceListJSONServlet context attribute where KeySpaceManager
+ // The ServiceListJSONServlet context attribute where OzoneManager
// instance gets stored.
- public static final String KSM_CONTEXT_ATTRIBUTE = "ozone.ksm";
+ public static final String OM_CONTEXT_ATTRIBUTE = "ozone.om";
private OzoneConsts() {
// Never Constructed
diff --git a/hadoop-hdds/common/src/main/java/org/apache/hadoop/ozone/common/Storage.java b/hadoop-hdds/common/src/main/java/org/apache/hadoop/ozone/common/Storage.java
index fb30d921b8..a32d559023 100644
--- a/hadoop-hdds/common/src/main/java/org/apache/hadoop/ozone/common/Storage.java
+++ b/hadoop-hdds/common/src/main/java/org/apache/hadoop/ozone/common/Storage.java
@@ -38,7 +38,7 @@
* Local storage information is stored in a separate file VERSION.
* It contains type of the node,
* the storage layout version, the SCM id, and
- * the KSM/SCM state creation time.
+ * the OM/SCM state creation time.
*
*/
@InterfaceAudience.Private
@@ -127,7 +127,7 @@ protected StorageInfo getStorageInfo() {
abstract protected Properties getNodeProperties();
/**
- * Sets the Node properties spaecific to KSM/SCM.
+ * Sets the Node properties spaecific to OM/SCM.
*/
private void setNodeProperties() {
Properties nodeProperties = getNodeProperties();
@@ -152,7 +152,7 @@ private File getCurrentDir() {
* File {@code VERSION} contains the following fields:
*
*
node type
- *
KSM/SCM state creation time
+ *
OM/SCM state creation time
*
other fields specific for this node type
*
* The version file is always written last during storage directory updates.
diff --git a/hadoop-hdds/common/src/main/proto/ScmBlockLocationProtocol.proto b/hadoop-hdds/common/src/main/proto/ScmBlockLocationProtocol.proto
index 7bea82ab86..53f408ae88 100644
--- a/hadoop-hdds/common/src/main/proto/ScmBlockLocationProtocol.proto
+++ b/hadoop-hdds/common/src/main/proto/ScmBlockLocationProtocol.proto
@@ -46,7 +46,7 @@ message AllocateScmBlockRequestProto {
}
/**
- * A delete key request sent by KSM to SCM, it contains
+ * A delete key request sent by OM to SCM, it contains
* multiple number of keys (and their blocks).
*/
message DeleteScmKeyBlocksRequestProto {
@@ -56,9 +56,9 @@ message DeleteScmKeyBlocksRequestProto {
/**
* A object key and all its associated blocks.
* We need to encapsulate object key name plus the blocks in this potocol
- * because SCM needs to response KSM with the keys it has deleted.
+ * because SCM needs to response OM with the keys it has deleted.
* If the response only contains blocks, it will be very expensive for
- * KSM to figure out what keys have been deleted.
+ * OM to figure out what keys have been deleted.
*/
message KeyBlocks {
required string key = 1;
@@ -66,7 +66,7 @@ message KeyBlocks {
}
/**
- * A delete key response from SCM to KSM, it contains multiple child-results.
+ * A delete key response from SCM to OM, it contains multiple child-results.
* Each child-result represents a key deletion result, only if all blocks of
* a key are successfully deleted, this key result is considered as succeed.
*/
@@ -111,7 +111,7 @@ message AllocateScmBlockResponseProto {
}
/**
- * Protocol used from KeySpaceManager to StorageContainerManager.
+ * Protocol used from OzoneManager to StorageContainerManager.
* See request and response messages for details of the RPC calls.
*/
service ScmBlockLocationProtocolService {
diff --git a/hadoop-hdds/common/src/main/proto/hdds.proto b/hadoop-hdds/common/src/main/proto/hdds.proto
index b9def2a3ec..a5ce994940 100644
--- a/hadoop-hdds/common/src/main/proto/hdds.proto
+++ b/hadoop-hdds/common/src/main/proto/hdds.proto
@@ -58,9 +58,9 @@ message KeyValue {
* Type of the node.
*/
enum NodeType {
- KSM = 1;
- SCM = 2;
- DATANODE = 3;
+ OM = 1; // Ozone Manager
+ SCM = 2; // Storage Container Manager
+ DATANODE = 3; // DataNode
}
// Should we rename NodeState to DatanodeState?
diff --git a/hadoop-hdds/common/src/main/resources/ozone-default.xml b/hadoop-hdds/common/src/main/resources/ozone-default.xml
index 568d26712a..530fb09b24 100644
--- a/hadoop-hdds/common/src/main/resources/ozone-default.xml
+++ b/hadoop-hdds/common/src/main/resources/ozone-default.xml
@@ -21,7 +21,7 @@
-
+
@@ -254,122 +254,122 @@
Tells ozone which storage handler to use. The possible values are:
distributed - The Ozone distributed storage handler, which speaks to
- KSM/SCM on the backend and provides REST services to clients.
+ OM/SCM on the backend and provides REST services to clients.
local - Local Storage handler strictly for testing - To be removed.
ozone.key.deleting.limit.per.task1000
- KSM, PERFORMANCE
+ OM, PERFORMANCE
A maximum number of keys to be scanned by key deleting service
- per time interval in KSM. Those keys are sent to delete metadata and
+ per time interval in OM. Those keys are sent to delete metadata and
generate transactions in SCM for next async deletion between SCM
and DataNode.
- ozone.ksm.address
+ ozone.om.address
- KSM, REQUIRED
+ OM, REQUIRED
- The address of the Ozone KSM service. This allows clients to discover
- the KSMs address.
+ The address of the Ozone OM service. This allows clients to discover
+ the address of the OM.
- ozone.ksm.group.rights
+ ozone.om.group.rightsREAD_WRITE
- KSM, SECURITY
+ OM, SECURITY
- Default group permissions in Ozone KSM.
+ Default group permissions in Ozone OM.
- ozone.ksm.handler.count.key
+ ozone.om.handler.count.key20
- KSM, PERFORMANCE
+ OM, PERFORMANCE
- The number of RPC handler threads for KSM service endpoints.
+ The number of RPC handler threads for OM service endpoints.
- ozone.ksm.http-address
+ ozone.om.http-address0.0.0.0:9874
- KSM, MANAGEMENT
+ OM, MANAGEMENT
- The address and the base port where the KSM web UI will listen on.
+ The address and the base port where the OM web UI will listen on.
If the port is 0, then the server will start on a free port. However, it
is best to specify a well-known port, so it is easy to connect and see
- the KSM management UI.
+ the OM management UI.
- ozone.ksm.http-bind-host
+ ozone.om.http-bind-host0.0.0.0
- KSM, MANAGEMENT
+ OM, MANAGEMENT
- The actual address the KSM web server will bind to. If this optional
+ The actual address the OM web server will bind to. If this optional
the address is set, it overrides only the hostname portion of
- ozone.ksm.http-address.
+ ozone.om.http-address.
- ozone.ksm.http.enabled
+ ozone.om.http.enabledtrue
- KSM, MANAGEMENT
+ OM, MANAGEMENT
- Property to enable or disable KSM web user interface.
+ Property to enable or disable OM web user interface.
- ozone.ksm.https-address
+ ozone.om.https-address0.0.0.0:9875
- KSM, MANAGEMENT, SECURITY
+ OM, MANAGEMENT, SECURITY
- The address and the base port where the KSM web UI will listen
+ The address and the base port where the OM web UI will listen
on using HTTPS.
If the port is 0 then the server will start on a free port.
- ozone.ksm.https-bind-host
+ ozone.om.https-bind-host0.0.0.0
- KSM, MANAGEMENT, SECURITY
+ OM, MANAGEMENT, SECURITY
- The actual address the KSM web server will bind to using HTTPS.
+ The actual address the OM web server will bind to using HTTPS.
If this optional address is set, it overrides only the hostname portion of
- ozone.ksm.http-address.
+ ozone.om.http-address.
- ozone.ksm.keytab.file
+ ozone.om.keytab.file
- KSM, SECURITY
+ OM, SECURITY
- The keytab file for Kerberos authentication in KSM.
+ The keytab file for Kerberos authentication in OM.
- ozone.ksm.db.cache.size.mb
+ ozone.om.db.cache.size.mb128
- KSM, PERFORMANCE
+ OM, PERFORMANCE
- The size of KSM DB cache in MB that used for caching files.
+ The size of OM DB cache in MB that used for caching files.
This value is set to an abnormally low value in the default configuration.
That is to make unit testing easy. Generally, this value should be set to
something like 16GB or more, if you intend to use Ozone at scale.
- A large value for this key allows a proportionally larger amount of KSM
- metadata to be cached in memory. This makes KSM operations faster.
+ A large value for this key allows a proportionally larger amount of OM
+ metadata to be cached in memory. This makes OM operations faster.
- ozone.ksm.user.max.volume
+ ozone.om.user.max.volume1024
- KSM, MANAGEMENT
+ OM, MANAGEMENT
The maximum number of volumes a user can have on a cluster.Increasing or
decreasing this number has no real impact on ozone cluster. This is
@@ -379,11 +379,11 @@
- ozone.ksm.user.rights
+ ozone.om.user.rightsREAD_WRITE
- KSM, SECURITY
+ OM, SECURITY
- Default user permissions used in KSM.
+ Default user permissions used in OM.
@@ -393,20 +393,20 @@
This is used only for testing purposes. This value is used by the local
storage handler to simulate a REST backend. This is useful only when
- debugging the REST front end independent of KSM and SCM. To be removed.
+ debugging the REST front end independent of OM and SCM. To be removed.
ozone.metadata.dirs
- OZONE, KSM, SCM, CONTAINER, REQUIRED, STORAGE
+ OZONE, OM, SCM, CONTAINER, REQUIRED, STORAGE
- Ozone metadata is shared among KSM, which acts as the namespace
+ Ozone metadata is shared among OM, which acts as the namespace
manager for ozone, SCM which acts as the block manager and data nodes
which maintain the name of the key(Key Name and BlockIDs). This
replicated and distributed metadata store is maintained under the
directory pointed by this key. Since metadata can be I/O intensive, at
- least on KSM and SCM we recommend having SSDs. If you have the luxury
+ least on OM and SCM we recommend having SSDs. If you have the luxury
of mapping this path to SSDs on all machines in the cluster, that will
be excellent.
@@ -417,10 +417,10 @@
ozone.metastore.implRocksDB
- OZONE, KSM, SCM, CONTAINER, STORAGE
+ OZONE, OM, SCM, CONTAINER, STORAGE
Ozone metadata store implementation. Ozone metadata are well
- distributed to multiple services such as ksm, scm. They are stored in
+ distributed to multiple services such as ozoneManager, scm. They are stored in
some local key-value databases. This property determines which database
library to use. Supported value is either LevelDB or RocksDB.
@@ -429,7 +429,7 @@
ozone.metastore.rocksdb.statisticsALL
- OZONE, KSM, SCM, STORAGE, PERFORMANCE
+ OZONE, OM, SCM, STORAGE, PERFORMANCE
The statistics level of the rocksdb store. If you use any value from
org.rocksdb.StatsLevel (eg. ALL or EXCEPT_DETAILED_TIMERS), the rocksdb
@@ -672,7 +672,7 @@
The heartbeat interval from a data node to SCM. Yes,
it is not three but 30, since most data nodes will heart beating via Ratis
heartbeats. If a client is not able to talk to a data node, it will notify
- KSM/SCM eventually. So a 30 second HB seems to work. This assumes that
+ OM/SCM eventually. So a 30 second HB seems to work. This assumes that
replication strategy used is Ratis if not, this value should be set to
something smaller like 3 seconds.
@@ -808,7 +808,7 @@
OZONE, SECURITY
- The server principal used by the SCM and KSM for web UI SPNEGO
+ The server principal used by the SCM and OM for web UI SPNEGO
authentication when Kerberos security is enabled. This is typically set to
HTTP/_HOST@REALM.TLD The SPNEGO server principal begins with the prefix
HTTP/ by convention.
@@ -867,9 +867,9 @@
ozone.key.preallocation.maxsize134217728
- OZONE, KSM, PERFORMANCE
+ OZONE, OM, PERFORMANCE
- When a new key write request is sent to KSM, if a size is requested, at most
+ When a new key write request is sent to OM, if a size is requested, at most
128MB of size is allocated at request time. If client needs more space for the
write, separate block allocation requests will be made.
@@ -938,7 +938,7 @@
ozone.open.key.cleanup.service.interval.seconds86400
- OZONE, KSM, PERFORMANCE
+ OZONE, OM, PERFORMANCE
A background job periodically checks open key entries and delete the expired ones. This entry controls the
interval of this cleanup check.
@@ -948,7 +948,7 @@
ozone.open.key.expire.threshold86400
- OZONE, KSM, PERFORMANCE
+ OZONE, OM, PERFORMANCE
Controls how long an open key operation is considered active. Specifically, if a key
has been open longer than the value of this config entry, that open key is considered as
@@ -958,12 +958,12 @@
hadoop.tags.custom
- OZONE,MANAGEMENT,SECURITY,PERFORMANCE,DEBUG,CLIENT,SERVER,KSM,SCM,CRITICAL,RATIS,CONTAINER,REQUIRED,REST,STORAGE,PIPELINE,STANDALONE
+ OZONE,MANAGEMENT,SECURITY,PERFORMANCE,DEBUG,CLIENT,SERVER,OM,SCM,CRITICAL,RATIS,CONTAINER,REQUIRED,REST,STORAGE,PIPELINE,STANDALONEozone.tags.system
- OZONE,MANAGEMENT,SECURITY,PERFORMANCE,DEBUG,CLIENT,SERVER,KSM,SCM,CRITICAL,RATIS,CONTAINER,REQUIRED,REST,STORAGE,PIPELINE,STANDALONE
+ OZONE,MANAGEMENT,SECURITY,PERFORMANCE,DEBUG,CLIENT,SERVER,OM,SCM,CRITICAL,RATIS,CONTAINER,REQUIRED,REST,STORAGE,PIPELINE,STANDALONE
diff --git a/hadoop-hdds/framework/src/main/resources/webapps/static/ozone.js b/hadoop-hdds/framework/src/main/resources/webapps/static/ozone.js
index 411438aae4..c2ed2adce2 100644
--- a/hadoop-hdds/framework/src/main/resources/webapps/static/ozone.js
+++ b/hadoop-hdds/framework/src/main/resources/webapps/static/ozone.js
@@ -270,7 +270,7 @@
$http.get("conf?cmd=getOzoneTags")
.then(function(response) {
ctrl.tags = response.data;
- var excludedTags = ['CBLOCK', 'KSM', 'SCM'];
+ var excludedTags = ['CBLOCK', 'OM', 'SCM'];
for (var i = 0; i < excludedTags.length; i++) {
var idx = ctrl.tags.indexOf(excludedTags[i]);
// Remove CBLOCK related properties
@@ -302,7 +302,7 @@
}
ctrl.loadAll = function() {
- $http.get("conf?cmd=getPropertyByTag&tags=KSM,SCM," + ctrl.tags)
+ $http.get("conf?cmd=getPropertyByTag&tags=OM,SCM," + ctrl.tags)
.then(function(response) {
ctrl.convertToArray(response.data);
diff --git a/hadoop-hdds/framework/src/main/resources/webapps/static/templates/config.html b/hadoop-hdds/framework/src/main/resources/webapps/static/templates/config.html
index 6825750c33..b52f6533fc 100644
--- a/hadoop-hdds/framework/src/main/resources/webapps/static/templates/config.html
+++ b/hadoop-hdds/framework/src/main/resources/webapps/static/templates/config.html
@@ -27,8 +27,8 @@
ng-click="$ctrl.switchto('All')">All
KSM
+ ng-class="$ctrl.allSelected('OM') ? 'btn-primary' :'btn-secondary'"
+ ng-click="$ctrl.switchto('OM')">OM
SCM
diff --git a/hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/block/DeletedBlockLog.java b/hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/block/DeletedBlockLog.java
index 4f4c75563b..28103bef95 100644
--- a/hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/block/DeletedBlockLog.java
+++ b/hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/block/DeletedBlockLog.java
@@ -28,7 +28,7 @@
/**
* The DeletedBlockLog is a persisted log in SCM to keep tracking
* container blocks which are under deletion. It maintains info
- * about under-deletion container blocks that notified by KSM,
+ * about under-deletion container blocks that notified by OM,
* and the state how it is processed.
*/
public interface DeletedBlockLog extends Closeable {
diff --git a/hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/container/states/ContainerStateMap.java b/hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/container/states/ContainerStateMap.java
index 3ada8fe192..c23b1fd17d 100644
--- a/hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/container/states/ContainerStateMap.java
+++ b/hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/container/states/ContainerStateMap.java
@@ -53,9 +53,9 @@
* client to able to write to it.
*
* 2. Owners - Each instance of Name service, for example, Namenode of HDFS or
- * Key Space Manager (KSM) of Ozone or CBlockServer -- is an owner. It is
- * possible to have many KSMs for a Ozone cluster and only one SCM. But SCM
- * keeps the data from each KSM in separate bucket, never mixing them. To
+ * Ozone Manager (OM) of Ozone or CBlockServer -- is an owner. It is
+ * possible to have many OMs for a Ozone cluster and only one SCM. But SCM
+ * keeps the data from each OM in separate bucket, never mixing them. To
* write data, often we have to find all open containers for a specific owner.
*
* 3. ReplicationType - The clients are allowed to specify what kind of
diff --git a/hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/node/CommandQueue.java b/hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/node/CommandQueue.java
index edbcfa12f2..996478caaa 100644
--- a/hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/node/CommandQueue.java
+++ b/hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/node/CommandQueue.java
@@ -33,7 +33,7 @@
/**
* Command Queue is queue of commands for the datanode.
*
- * Node manager, container Manager and key space managers can queue commands for
+ * Node manager, container Manager and Ozone managers can queue commands for
* datanodes into this queue. These commands will be send in the order in which
* there where queued.
*/
diff --git a/hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/server/SCMBlockProtocolServer.java b/hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/server/SCMBlockProtocolServer.java
index 98fe9a1137..3bb284e8d0 100644
--- a/hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/server/SCMBlockProtocolServer.java
+++ b/hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/server/SCMBlockProtocolServer.java
@@ -152,7 +152,7 @@ public AllocatedBlock allocateBlock(long size, HddsProtos.ReplicationType
@Override
public List deleteKeyBlocks(
List keyBlocksInfoList) throws IOException {
- LOG.info("SCM is informed by KSM to delete {} blocks", keyBlocksInfoList
+ LOG.info("SCM is informed by OM to delete {} blocks", keyBlocksInfoList
.size());
List results = new ArrayList<>();
for (BlockGroup keyBlocks : keyBlocksInfoList) {
diff --git a/hadoop-hdds/tools/src/main/java/org/apache/hadoop/hdds/scm/cli/OzoneBaseCLI.java b/hadoop-hdds/tools/src/main/java/org/apache/hadoop/hdds/scm/cli/OzoneBaseCLI.java
index 727c81a0d8..782844517b 100644
--- a/hadoop-hdds/tools/src/main/java/org/apache/hadoop/hdds/scm/cli/OzoneBaseCLI.java
+++ b/hadoop-hdds/tools/src/main/java/org/apache/hadoop/hdds/scm/cli/OzoneBaseCLI.java
@@ -27,7 +27,7 @@
import java.net.URISyntaxException;
/**
- * This class is the base CLI for scm, ksm and scmadm.
+ * This class is the base CLI for scm, om and scmadm.
*/
public abstract class OzoneBaseCLI extends Configured implements Tool {
diff --git a/hadoop-ozone/acceptance-test/src/test/acceptance/basic/basic.robot b/hadoop-ozone/acceptance-test/src/test/acceptance/basic/basic.robot
index c741588c19..6d6fea0273 100644
--- a/hadoop-ozone/acceptance-test/src/test/acceptance/basic/basic.robot
+++ b/hadoop-ozone/acceptance-test/src/test/acceptance/basic/basic.robot
@@ -39,12 +39,12 @@ Test rest interface
Should contain ${result} 200 OK
Check webui static resources
- ${result} = Execute on scm curl -s -I http://localhost:9876/static/bootstrap-3.3.7/js/bootstrap.min.js
+ ${result} = Execute on scm curl -s -I http://localhost:9876/static/bootstrap-3.3.7/js/bootstrap.min.js
Should contain ${result} 200
- ${result} = Execute on ksm curl -s -I http://localhost:9874/static/bootstrap-3.3.7/js/bootstrap.min.js
+ ${result} = Execute on ozoneManager curl -s -I http://localhost:9874/static/bootstrap-3.3.7/js/bootstrap.min.js
Should contain ${result} 200
Start freon testing
- ${result} = Execute on ksm ozone freon -numOfVolumes 5 -numOfBuckets 5 -numOfKeys 5 -numOfThreads 10
+ ${result} = Execute on ozoneManager ozone freon -numOfVolumes 5 -numOfBuckets 5 -numOfKeys 5 -numOfThreads 10
Wait Until Keyword Succeeds 3min 10sec Should contain ${result} Number of Keys added: 125
Should Not Contain ${result} ERROR
diff --git a/hadoop-ozone/acceptance-test/src/test/acceptance/basic/docker-compose.yaml b/hadoop-ozone/acceptance-test/src/test/acceptance/basic/docker-compose.yaml
index b50f42d3e9..99f28310f1 100644
--- a/hadoop-ozone/acceptance-test/src/test/acceptance/basic/docker-compose.yaml
+++ b/hadoop-ozone/acceptance-test/src/test/acceptance/basic/docker-compose.yaml
@@ -25,18 +25,18 @@ services:
command: ["/opt/hadoop/bin/ozone","datanode"]
env_file:
- ./docker-config
- ksm:
+ ozoneManager:
image: apache/hadoop-runner
- hostname: ksm
+ hostname: ozoneManager
volumes:
- ${OZONEDIR}:/opt/hadoop
ports:
- 9874
environment:
- ENSURE_KSM_INITIALIZED: /data/metadata/ksm/current/VERSION
+ ENSURE_OM_INITIALIZED: /data/metadata/ozoneManager/current/VERSION
env_file:
- ./docker-config
- command: ["/opt/hadoop/bin/ozone","ksm"]
+ command: ["/opt/hadoop/bin/ozone","om"]
scm:
image: apache/hadoop-runner
volumes:
diff --git a/hadoop-ozone/acceptance-test/src/test/acceptance/basic/docker-config b/hadoop-ozone/acceptance-test/src/test/acceptance/basic/docker-config
index c3ec2ef71b..b72085b22f 100644
--- a/hadoop-ozone/acceptance-test/src/test/acceptance/basic/docker-config
+++ b/hadoop-ozone/acceptance-test/src/test/acceptance/basic/docker-config
@@ -14,8 +14,8 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-OZONE-SITE.XML_ozone.ksm.address=ksm
-OZONE-SITE.XML_ozone.ksm.http-address=ksm:9874
+OZONE-SITE.XML_ozone.om.address=ozoneManager
+OZONE-SITE.XML_ozone.om.http-address=ozoneManager:9874
OZONE-SITE.XML_ozone.scm.names=scm
OZONE-SITE.XML_ozone.enabled=True
OZONE-SITE.XML_ozone.scm.datanode.id=/data/datanode.id
diff --git a/hadoop-ozone/acceptance-test/src/test/acceptance/basic/ozone-shell.robot b/hadoop-ozone/acceptance-test/src/test/acceptance/basic/ozone-shell.robot
index 9521ad60be..f4be3e0f6a 100644
--- a/hadoop-ozone/acceptance-test/src/test/acceptance/basic/ozone-shell.robot
+++ b/hadoop-ozone/acceptance-test/src/test/acceptance/basic/ozone-shell.robot
@@ -28,22 +28,22 @@ ${PROJECTDIR} ${CURDIR}/../../../../../..
*** Test Cases ***
RestClient without http port
- Test ozone shell http:// ksm restwoport True
+ Test ozone shell http:// ozoneManager restwoport True
RestClient with http port
- Test ozone shell http:// ksm:9874 restwport True
+ Test ozone shell http:// ozoneManager:9874 restwport True
RestClient without host name
- Test ozone shell http:// ${EMPTY} restwohost True
+ Test ozone shell http:// ${EMPTY} restwohost True
RpcClient with port
- Test ozone shell o3:// ksm:9862 rpcwoport False
+ Test ozone shell o3:// ozoneManager:9862 rpcwoport False
RpcClient without host
- Test ozone shell o3:// ${EMPTY} rpcwport False
+ Test ozone shell o3:// ${EMPTY} rpcwport False
RpcClient without scheme
- Test ozone shell ${EMPTY} ${EMPTY} rpcwoscheme False
+ Test ozone shell ${EMPTY} ${EMPTY} rpcwoscheme False
*** Keywords ***
@@ -52,7 +52,7 @@ Test ozone shell
${result} = Execute on datanode ozone oz -createVolume ${protocol}${server}/${volume} -user bilbo -quota 100TB -root
Should not contain ${result} Failed
Should contain ${result} Creating Volume: ${volume}
- ${result} = Execute on datanode ozone oz -listVolume o3://ksm -user bilbo | grep -Ev 'Removed|WARN|DEBUG|ERROR|INFO|TRACE' | jq -r '.[] | select(.volumeName=="${volume}")'
+ ${result} = Execute on datanode ozone oz -listVolume o3://ozoneManager -user bilbo | grep -Ev 'Removed|WARN|DEBUG|ERROR|INFO|TRACE' | jq -r '.[] | select(.volumeName=="${volume}")'
Should contain ${result} createdOn
Execute on datanode ozone oz -updateVolume ${protocol}${server}/${volume} -user bill -quota 10TB
${result} = Execute on datanode ozone oz -infoVolume ${protocol}${server}/${volume} | grep -Ev 'Removed|WARN|DEBUG|ERROR|INFO|TRACE' | jq -r '. | select(.volumeName=="${volume}") | .owner | .name'
@@ -66,7 +66,7 @@ Test ozone shell
Should Be Equal ${result} GROUP
${result} = Execute on datanode ozone oz -updateBucket ${protocol}${server}/${volume}/bb1 -removeAcl group:samwise:r | grep -Ev 'Removed|WARN|DEBUG|ERROR|INFO|TRACE' | jq -r '. | select(.bucketName=="bb1") | .acls | .[] | select(.name=="frodo") | .type'
Should Be Equal ${result} USER
- ${result} = Execute on datanode ozone oz -listBucket o3://ksm/${volume}/ | grep -Ev 'Removed|WARN|DEBUG|ERROR|INFO|TRACE' | jq -r '.[] | select(.bucketName=="bb1") | .volumeName'
+ ${result} = Execute on datanode ozone oz -listBucket o3://ozoneManager/${volume}/ | grep -Ev 'Removed|WARN|DEBUG|ERROR|INFO|TRACE' | jq -r '.[] | select(.bucketName=="bb1") | .volumeName'
Should Be Equal ${result} ${volume}
Run Keyword and Return If ${withkeytest} Test key handling ${protocol} ${server} ${volume}
Execute on datanode ozone oz -deleteBucket ${protocol}${server}/${volume}/bb1
@@ -80,6 +80,6 @@ Test key handling
Execute on datanode ls -l NOTICE.txt.1
${result} = Execute on datanode ozone oz -infoKey ${protocol}${server}/${volume}/bb1/key1 | grep -Ev 'Removed|WARN|DEBUG|ERROR|INFO|TRACE' | jq -r '. | select(.keyName=="key1")'
Should contain ${result} createdOn
- ${result} = Execute on datanode ozone oz -listKey o3://ksm/${volume}/bb1 | grep -Ev 'Removed|WARN|DEBUG|ERROR|INFO|TRACE' | jq -r '.[] | select(.keyName=="key1") | .keyName'
+ ${result} = Execute on datanode ozone oz -listKey o3://ozoneManager/${volume}/bb1 | grep -Ev 'Removed|WARN|DEBUG|ERROR|INFO|TRACE' | jq -r '.[] | select(.keyName=="key1") | .keyName'
Should Be Equal ${result} key1
Execute on datanode ozone oz -deleteKey ${protocol}${server}/${volume}/bb1/key1 -v
diff --git a/hadoop-ozone/acceptance-test/src/test/acceptance/commonlib.robot b/hadoop-ozone/acceptance-test/src/test/acceptance/commonlib.robot
index a5ea30af34..9235cd917a 100644
--- a/hadoop-ozone/acceptance-test/src/test/acceptance/commonlib.robot
+++ b/hadoop-ozone/acceptance-test/src/test/acceptance/commonlib.robot
@@ -21,12 +21,12 @@ Startup Ozone cluster with size
Run echo "Starting new docker-compose environment" >> docker-compose.log
${rc} ${output} = Run docker compose up -d
Should Be Equal As Integers ${rc} 0
- Wait Until Keyword Succeeds 1min 5sec Is Daemon started ksm HTTP server of KSM is listening
+ Wait Until Keyword Succeeds 1min 5sec Is Daemon started ozoneManager HTTP server of OZONEMANAGER is listening
Daemons are running without error
Scale datanodes up 5
Daemons are running without error
- Is daemon running without error ksm
+ Is daemon running without error ozoneManager
Is daemon running without error scm
Is daemon running without error datanode
diff --git a/hadoop-ozone/acceptance-test/src/test/acceptance/ozonefs/docker-compose.yaml b/hadoop-ozone/acceptance-test/src/test/acceptance/ozonefs/docker-compose.yaml
index 12022dfe61..6b7b7bd946 100644
--- a/hadoop-ozone/acceptance-test/src/test/acceptance/ozonefs/docker-compose.yaml
+++ b/hadoop-ozone/acceptance-test/src/test/acceptance/ozonefs/docker-compose.yaml
@@ -25,18 +25,18 @@ services:
command: ["/opt/hadoop/bin/ozone","datanode"]
env_file:
- ./docker-config
- ksm:
+ ozoneManager:
image: apache/hadoop-runner
- hostname: ksm
+ hostname: ozoneManager
volumes:
- ${OZONEDIR}:/opt/hadoop
ports:
- 9874
environment:
- ENSURE_KSM_INITIALIZED: /data/metadata/ksm/current/VERSION
+ ENSURE_OM_INITIALIZED: /data/metadata/ozoneManager/current/VERSION
env_file:
- ./docker-config
- command: ["/opt/hadoop/bin/ozone","ksm"]
+ command: ["/opt/hadoop/bin/ozone","om"]
scm:
image: apache/hadoop-runner
volumes:
diff --git a/hadoop-ozone/acceptance-test/src/test/acceptance/ozonefs/docker-config b/hadoop-ozone/acceptance-test/src/test/acceptance/ozonefs/docker-config
index e06d434bb4..b0129bce0f 100644
--- a/hadoop-ozone/acceptance-test/src/test/acceptance/ozonefs/docker-config
+++ b/hadoop-ozone/acceptance-test/src/test/acceptance/ozonefs/docker-config
@@ -15,8 +15,8 @@
# limitations under the License.
CORE-SITE.XML_fs.o3.impl=org.apache.hadoop.fs.ozone.OzoneFileSystem
-OZONE-SITE.XML_ozone.ksm.address=ksm
-OZONE-SITE.XML_ozone.ksm.http-address=ksm:9874
+OZONE-SITE.XML_ozone.om.address=ozoneManager
+OZONE-SITE.XML_ozone.om.http-address=ozoneManager:9874
OZONE-SITE.XML_ozone.scm.names=scm
OZONE-SITE.XML_ozone.enabled=True
OZONE-SITE.XML_ozone.scm.datanode.id=/data/datanode.id
diff --git a/hadoop-ozone/acceptance-test/src/test/acceptance/ozonefs/ozonefs.robot b/hadoop-ozone/acceptance-test/src/test/acceptance/ozonefs/ozonefs.robot
index 9e8a5d2004..ea473c0de7 100644
--- a/hadoop-ozone/acceptance-test/src/test/acceptance/ozonefs/ozonefs.robot
+++ b/hadoop-ozone/acceptance-test/src/test/acceptance/ozonefs/ozonefs.robot
@@ -27,13 +27,13 @@ ${PROJECTDIR} ${CURDIR}/../../../../../..
*** Test Cases ***
Create volume and bucket
- Execute on datanode ozone oz -createVolume http://ksm/fstest -user bilbo -quota 100TB -root
- Execute on datanode ozone oz -createBucket http://ksm/fstest/bucket1
+ Execute on datanode ozone oz -createVolume http://ozoneManager/fstest -user bilbo -quota 100TB -root
+ Execute on datanode ozone oz -createBucket http://ozoneManager/fstest/bucket1
Check volume from ozonefs
${result} = Execute on hadooplast hdfs dfs -ls o3://bucket1.fstest/
Create directory from ozonefs
Execute on hadooplast hdfs dfs -mkdir -p o3://bucket1.fstest/testdir/deep
- ${result} = Execute on ksm ozone oz -listKey o3://ksm/fstest/bucket1 | grep -v WARN | jq -r '.[].keyName'
+ ${result} = Execute on ozoneManager ozone oz -listKey o3://ozoneManager/fstest/bucket1 | grep -v WARN | jq -r '.[].keyName'
Should contain ${result} testdir/deep
diff --git a/hadoop-ozone/client/src/main/java/org/apache/hadoop/ozone/client/BucketArgs.java b/hadoop-ozone/client/src/main/java/org/apache/hadoop/ozone/client/BucketArgs.java
index 39b7bb8403..0da52dc033 100644
--- a/hadoop-ozone/client/src/main/java/org/apache/hadoop/ozone/client/BucketArgs.java
+++ b/hadoop-ozone/client/src/main/java/org/apache/hadoop/ozone/client/BucketArgs.java
@@ -81,7 +81,7 @@ public List getAcls() {
}
/**
- * Returns new builder class that builds a KsmBucketInfo.
+ * Returns new builder class that builds a OmBucketInfo.
*
* @return Builder
*/
@@ -90,7 +90,7 @@ public static BucketArgs.Builder newBuilder() {
}
/**
- * Builder for KsmBucketInfo.
+ * Builder for OmBucketInfo.
*/
public static class Builder {
private Boolean versioning;
diff --git a/hadoop-ozone/client/src/main/java/org/apache/hadoop/ozone/client/OzoneClientFactory.java b/hadoop-ozone/client/src/main/java/org/apache/hadoop/ozone/client/OzoneClientFactory.java
index 3085b0daa6..de0d166abd 100644
--- a/hadoop-ozone/client/src/main/java/org/apache/hadoop/ozone/client/OzoneClientFactory.java
+++ b/hadoop-ozone/client/src/main/java/org/apache/hadoop/ozone/client/OzoneClientFactory.java
@@ -21,7 +21,7 @@
import com.google.common.base.Preconditions;
import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.hdds.conf.OzoneConfiguration;
-import org.apache.hadoop.ozone.KsmUtils;
+import org.apache.hadoop.ozone.OmUtils;
import org.apache.hadoop.ozone.client.protocol.ClientProtocol;
import org.apache.hadoop.ozone.client.rest.RestClient;
import org.apache.hadoop.ozone.client.rpc.RpcClient;
@@ -34,11 +34,9 @@
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Proxy;
-import static org.apache.hadoop.ozone.OzoneConfigKeys
- .OZONE_CLIENT_PROTOCOL;
-import static org.apache.hadoop.ozone.ksm.KSMConfigKeys
- .OZONE_KSM_HTTP_ADDRESS_KEY;
-import static org.apache.hadoop.ozone.ksm.KSMConfigKeys.OZONE_KSM_ADDRESS_KEY;
+import static org.apache.hadoop.ozone.OzoneConfigKeys.OZONE_CLIENT_PROTOCOL;
+import static org.apache.hadoop.ozone.om.OMConfigKeys.OZONE_OM_ADDRESS_KEY;
+import static org.apache.hadoop.ozone.om.OMConfigKeys.OZONE_OM_HTTP_ADDRESS_KEY;
/**
* Factory class to create different types of OzoneClients.
@@ -97,46 +95,46 @@ public static OzoneClient getClient(Configuration config)
/**
* Returns an OzoneClient which will use RPC protocol.
*
- * @param ksmHost
- * hostname of KeySpaceManager to connect.
+ * @param omHost
+ * hostname of OzoneManager to connect.
*
* @return OzoneClient
*
* @throws IOException
*/
- public static OzoneClient getRpcClient(String ksmHost)
+ public static OzoneClient getRpcClient(String omHost)
throws IOException {
Configuration config = new OzoneConfiguration();
- int port = KsmUtils.getKsmRpcPort(config);
- return getRpcClient(ksmHost, port, config);
+ int port = OmUtils.getOmRpcPort(config);
+ return getRpcClient(omHost, port, config);
}
/**
* Returns an OzoneClient which will use RPC protocol.
*
- * @param ksmHost
- * hostname of KeySpaceManager to connect.
+ * @param omHost
+ * hostname of OzoneManager to connect.
*
- * @param ksmRpcPort
- * RPC port of KeySpaceManager.
+ * @param omRpcPort
+ * RPC port of OzoneManager.
*
* @return OzoneClient
*
* @throws IOException
*/
- public static OzoneClient getRpcClient(String ksmHost, Integer ksmRpcPort)
+ public static OzoneClient getRpcClient(String omHost, Integer omRpcPort)
throws IOException {
- return getRpcClient(ksmHost, ksmRpcPort, new OzoneConfiguration());
+ return getRpcClient(omHost, omRpcPort, new OzoneConfiguration());
}
/**
* Returns an OzoneClient which will use RPC protocol.
*
- * @param ksmHost
- * hostname of KeySpaceManager to connect.
+ * @param omHost
+ * hostname of OzoneManager to connect.
*
- * @param ksmRpcPort
- * RPC port of KeySpaceManager.
+ * @param omRpcPort
+ * RPC port of OzoneManager.
*
* @param config
* Configuration to be used for OzoneClient creation
@@ -145,13 +143,13 @@ public static OzoneClient getRpcClient(String ksmHost, Integer ksmRpcPort)
*
* @throws IOException
*/
- public static OzoneClient getRpcClient(String ksmHost, Integer ksmRpcPort,
+ public static OzoneClient getRpcClient(String omHost, Integer omRpcPort,
Configuration config)
throws IOException {
- Preconditions.checkNotNull(ksmHost);
- Preconditions.checkNotNull(ksmRpcPort);
+ Preconditions.checkNotNull(omHost);
+ Preconditions.checkNotNull(omRpcPort);
Preconditions.checkNotNull(config);
- config.set(OZONE_KSM_ADDRESS_KEY, ksmHost + ":" + ksmRpcPort);
+ config.set(OZONE_OM_ADDRESS_KEY, omHost + ":" + omRpcPort);
return getRpcClient(config);
}
@@ -175,46 +173,46 @@ public static OzoneClient getRpcClient(Configuration config)
/**
* Returns an OzoneClient which will use REST protocol.
*
- * @param ksmHost
- * hostname of KeySpaceManager to connect.
+ * @param omHost
+ * hostname of OzoneManager to connect.
*
* @return OzoneClient
*
* @throws IOException
*/
- public static OzoneClient getRestClient(String ksmHost)
+ public static OzoneClient getRestClient(String omHost)
throws IOException {
Configuration config = new OzoneConfiguration();
- int port = KsmUtils.getKsmRestPort(config);
- return getRestClient(ksmHost, port, config);
+ int port = OmUtils.getOmRestPort(config);
+ return getRestClient(omHost, port, config);
}
/**
* Returns an OzoneClient which will use REST protocol.
*
- * @param ksmHost
- * hostname of KeySpaceManager to connect.
+ * @param omHost
+ * hostname of OzoneManager to connect.
*
- * @param ksmHttpPort
- * HTTP port of KeySpaceManager.
+ * @param omHttpPort
+ * HTTP port of OzoneManager.
*
* @return OzoneClient
*
* @throws IOException
*/
- public static OzoneClient getRestClient(String ksmHost, Integer ksmHttpPort)
+ public static OzoneClient getRestClient(String omHost, Integer omHttpPort)
throws IOException {
- return getRestClient(ksmHost, ksmHttpPort, new OzoneConfiguration());
+ return getRestClient(omHost, omHttpPort, new OzoneConfiguration());
}
/**
* Returns an OzoneClient which will use REST protocol.
*
- * @param ksmHost
- * hostname of KeySpaceManager to connect.
+ * @param omHost
+ * hostname of OzoneManager to connect.
*
- * @param ksmHttpPort
- * HTTP port of KeySpaceManager.
+ * @param omHttpPort
+ * HTTP port of OzoneManager.
*
* @param config
* Configuration to be used for OzoneClient creation
@@ -223,13 +221,13 @@ public static OzoneClient getRestClient(String ksmHost, Integer ksmHttpPort)
*
* @throws IOException
*/
- public static OzoneClient getRestClient(String ksmHost, Integer ksmHttpPort,
+ public static OzoneClient getRestClient(String omHost, Integer omHttpPort,
Configuration config)
throws IOException {
- Preconditions.checkNotNull(ksmHost);
- Preconditions.checkNotNull(ksmHttpPort);
+ Preconditions.checkNotNull(omHost);
+ Preconditions.checkNotNull(omHttpPort);
Preconditions.checkNotNull(config);
- config.set(OZONE_KSM_HTTP_ADDRESS_KEY, ksmHost + ":" + ksmHttpPort);
+ config.set(OZONE_OM_HTTP_ADDRESS_KEY, omHost + ":" + omHttpPort);
return getRestClient(config);
}
diff --git a/hadoop-ozone/client/src/main/java/org/apache/hadoop/ozone/client/OzoneKey.java b/hadoop-ozone/client/src/main/java/org/apache/hadoop/ozone/client/OzoneKey.java
index 0c723dd8ab..7c93146abd 100644
--- a/hadoop-ozone/client/src/main/java/org/apache/hadoop/ozone/client/OzoneKey.java
+++ b/hadoop-ozone/client/src/main/java/org/apache/hadoop/ozone/client/OzoneKey.java
@@ -49,7 +49,7 @@ public class OzoneKey {
private long modificationTime;
/**
- * Constructs OzoneKey from KsmKeyInfo.
+ * Constructs OzoneKey from OmKeyInfo.
*
*/
public OzoneKey(String volumeName, String bucketName,
diff --git a/hadoop-ozone/client/src/main/java/org/apache/hadoop/ozone/client/VolumeArgs.java b/hadoop-ozone/client/src/main/java/org/apache/hadoop/ozone/client/VolumeArgs.java
index f1aa03108a..ae1cfccd42 100644
--- a/hadoop-ozone/client/src/main/java/org/apache/hadoop/ozone/client/VolumeArgs.java
+++ b/hadoop-ozone/client/src/main/java/org/apache/hadoop/ozone/client/VolumeArgs.java
@@ -77,7 +77,7 @@ public List getAcls() {
return acls;
}
/**
- * Returns new builder class that builds a KsmVolumeArgs.
+ * Returns new builder class that builds a OmVolumeArgs.
*
* @return Builder
*/
@@ -86,7 +86,7 @@ public static VolumeArgs.Builder newBuilder() {
}
/**
- * Builder for KsmVolumeArgs.
+ * Builder for OmVolumeArgs.
*/
public static class Builder {
private String adminName;
diff --git a/hadoop-ozone/client/src/main/java/org/apache/hadoop/ozone/client/io/ChunkGroupInputStream.java b/hadoop-ozone/client/src/main/java/org/apache/hadoop/ozone/client/io/ChunkGroupInputStream.java
index edd85aabee..b3a566e43f 100644
--- a/hadoop-ozone/client/src/main/java/org/apache/hadoop/ozone/client/io/ChunkGroupInputStream.java
+++ b/hadoop-ozone/client/src/main/java/org/apache/hadoop/ozone/client/io/ChunkGroupInputStream.java
@@ -23,8 +23,8 @@
import org.apache.hadoop.hdds.protocol.datanode.proto.ContainerProtos;
import org.apache.hadoop.hdds.client.BlockID;
import org.apache.hadoop.hdds.scm.container.common.helpers.ContainerWithPipeline;
-import org.apache.hadoop.ozone.ksm.helpers.KsmKeyInfo;
-import org.apache.hadoop.ozone.ksm.helpers.KsmKeyLocationInfo;
+import org.apache.hadoop.ozone.om.helpers.OmKeyInfo;
+import org.apache.hadoop.ozone.om.helpers.OmKeyLocationInfo;
import org.apache.hadoop.hdds.scm.XceiverClientManager;
import org.apache.hadoop.hdds.scm.XceiverClientSpi;
import org.apache.hadoop.hdds.scm.protocolPB.StorageContainerLocationProtocolClientSideTranslatorPB;
@@ -255,28 +255,29 @@ public boolean seekToNewSource(long targetPos) throws IOException {
}
}
- public static LengthInputStream getFromKsmKeyInfo(KsmKeyInfo keyInfo,
+ public static LengthInputStream getFromOmKeyInfo(
+ OmKeyInfo keyInfo,
XceiverClientManager xceiverClientManager,
StorageContainerLocationProtocolClientSideTranslatorPB
- storageContainerLocationClient, String requestId)
- throws IOException {
+ storageContainerLocationClient,
+ String requestId) throws IOException {
long length = 0;
long containerKey;
ChunkGroupInputStream groupInputStream = new ChunkGroupInputStream();
groupInputStream.key = keyInfo.getKeyName();
- List keyLocationInfos =
+ List keyLocationInfos =
keyInfo.getLatestVersionLocations().getBlocksLatestVersionOnly();
groupInputStream.streamOffset = new long[keyLocationInfos.size()];
for (int i = 0; i < keyLocationInfos.size(); i++) {
- KsmKeyLocationInfo ksmKeyLocationInfo = keyLocationInfos.get(i);
- BlockID blockID = ksmKeyLocationInfo.getBlockID();
+ OmKeyLocationInfo omKeyLocationInfo = keyLocationInfos.get(i);
+ BlockID blockID = omKeyLocationInfo.getBlockID();
long containerID = blockID.getContainerID();
ContainerWithPipeline containerWithPipeline =
storageContainerLocationClient.getContainerWithPipeline(containerID);
XceiverClientSpi xceiverClient = xceiverClientManager
.acquireClient(containerWithPipeline.getPipeline(), containerID);
boolean success = false;
- containerKey = ksmKeyLocationInfo.getLocalID();
+ containerKey = omKeyLocationInfo.getLocalID();
try {
LOG.debug("get key accessing {} {}",
containerID, containerKey);
@@ -292,11 +293,10 @@ public static LengthInputStream getFromKsmKeyInfo(KsmKeyInfo keyInfo,
}
success = true;
ChunkInputStream inputStream = new ChunkInputStream(
- ksmKeyLocationInfo.getBlockID(), xceiverClientManager,
- xceiverClient,
+ omKeyLocationInfo.getBlockID(), xceiverClientManager, xceiverClient,
chunks, requestId);
groupInputStream.addStream(inputStream,
- ksmKeyLocationInfo.getLength());
+ omKeyLocationInfo.getLength());
} finally {
if (!success) {
xceiverClientManager.releaseClient(xceiverClient);
diff --git a/hadoop-ozone/client/src/main/java/org/apache/hadoop/ozone/client/io/ChunkGroupOutputStream.java b/hadoop-ozone/client/src/main/java/org/apache/hadoop/ozone/client/io/ChunkGroupOutputStream.java
index d1a3b46b81..94433179f9 100644
--- a/hadoop-ozone/client/src/main/java/org/apache/hadoop/ozone/client/io/ChunkGroupOutputStream.java
+++ b/hadoop-ozone/client/src/main/java/org/apache/hadoop/ozone/client/io/ChunkGroupOutputStream.java
@@ -24,15 +24,15 @@
import org.apache.hadoop.hdds.scm.container.common.helpers.ContainerInfo;
import org.apache.hadoop.hdds.client.BlockID;
import org.apache.hadoop.hdds.scm.container.common.helpers.ContainerWithPipeline;
-import org.apache.hadoop.ozone.ksm.helpers.KsmKeyLocationInfoGroup;
+import org.apache.hadoop.ozone.om.helpers.OmKeyLocationInfoGroup;
import org.apache.hadoop.hdds.protocol.proto.HddsProtos.ReplicationType;
import org.apache.hadoop.hdds.protocol.proto.HddsProtos.ReplicationFactor;
import org.apache.hadoop.hdds.protocol.proto.StorageContainerLocationProtocolProtos.ObjectStageChangeRequestProto;
-import org.apache.hadoop.ozone.ksm.helpers.KsmKeyArgs;
-import org.apache.hadoop.ozone.ksm.helpers.KsmKeyInfo;
-import org.apache.hadoop.ozone.ksm.helpers.KsmKeyLocationInfo;
-import org.apache.hadoop.ozone.ksm.helpers.OpenKeySession;
-import org.apache.hadoop.ozone.ksm.protocolPB.KeySpaceManagerProtocolClientSideTranslatorPB;
+import org.apache.hadoop.ozone.om.helpers.OmKeyArgs;
+import org.apache.hadoop.ozone.om.helpers.OmKeyInfo;
+import org.apache.hadoop.ozone.om.helpers.OmKeyLocationInfo;
+import org.apache.hadoop.ozone.om.helpers.OpenKeySession;
+import org.apache.hadoop.ozone.om.protocolPB.OzoneManagerProtocolClientSideTranslatorPB;
import org.apache.hadoop.hdds.scm.XceiverClientManager;
import org.apache.hadoop.hdds.scm.XceiverClientSpi;
import org.apache.hadoop.hdds.scm.container.common.helpers
@@ -67,10 +67,10 @@ public class ChunkGroupOutputStream extends OutputStream {
private final ArrayList streamEntries;
private int currentStreamIndex;
private long byteOffset;
- private final KeySpaceManagerProtocolClientSideTranslatorPB ksmClient;
+ private final OzoneManagerProtocolClientSideTranslatorPB omClient;
private final
StorageContainerLocationProtocolClientSideTranslatorPB scmClient;
- private final KsmKeyArgs keyArgs;
+ private final OmKeyArgs keyArgs;
private final int openID;
private final XceiverClientManager xceiverClientManager;
private final int chunkSize;
@@ -83,7 +83,7 @@ public class ChunkGroupOutputStream extends OutputStream {
@VisibleForTesting
public ChunkGroupOutputStream() {
streamEntries = new ArrayList<>();
- ksmClient = null;
+ omClient = null;
scmClient = null;
keyArgs = null;
openID = -1;
@@ -113,16 +113,16 @@ public List getStreamEntries() {
public ChunkGroupOutputStream(
OpenKeySession handler, XceiverClientManager xceiverClientManager,
StorageContainerLocationProtocolClientSideTranslatorPB scmClient,
- KeySpaceManagerProtocolClientSideTranslatorPB ksmClient,
+ OzoneManagerProtocolClientSideTranslatorPB omClient,
int chunkSize, String requestId, ReplicationFactor factor,
ReplicationType type) throws IOException {
this.streamEntries = new ArrayList<>();
this.currentStreamIndex = 0;
this.byteOffset = 0;
- this.ksmClient = ksmClient;
+ this.omClient = omClient;
this.scmClient = scmClient;
- KsmKeyInfo info = handler.getKeyInfo();
- this.keyArgs = new KsmKeyArgs.Builder()
+ OmKeyInfo info = handler.getKeyInfo();
+ this.keyArgs = new OmKeyArgs.Builder()
.setVolumeName(info.getVolumeName())
.setBucketName(info.getBucketName())
.setKeyName(info.getKeyName())
@@ -150,19 +150,19 @@ public ChunkGroupOutputStream(
* @param openVersion the version corresponding to the pre-allocation.
* @throws IOException
*/
- public void addPreallocateBlocks(KsmKeyLocationInfoGroup version,
+ public void addPreallocateBlocks(OmKeyLocationInfoGroup version,
long openVersion) throws IOException {
// server may return any number of blocks, (0 to any)
// only the blocks allocated in this open session (block createVersion
// equals to open session version)
- for (KsmKeyLocationInfo subKeyInfo : version.getLocationList()) {
+ for (OmKeyLocationInfo subKeyInfo : version.getLocationList()) {
if (subKeyInfo.getCreateVersion() == openVersion) {
checkKeyLocationInfo(subKeyInfo);
}
}
}
- private void checkKeyLocationInfo(KsmKeyLocationInfo subKeyInfo)
+ private void checkKeyLocationInfo(OmKeyLocationInfo subKeyInfo)
throws IOException {
ContainerWithPipeline containerWithPipeline = scmClient
.getContainerWithPipeline(subKeyInfo.getContainerID());
@@ -210,7 +210,7 @@ public synchronized void write(int b) throws IOException {
checkNotClosed();
if (streamEntries.size() <= currentStreamIndex) {
- Preconditions.checkNotNull(ksmClient);
+ Preconditions.checkNotNull(omClient);
// allocate a new block, if a exception happens, log an error and
// throw exception to the caller directly, and the write fails.
try {
@@ -258,7 +258,7 @@ public synchronized void write(byte[] b, int off, int len)
int succeededAllocates = 0;
while (len > 0) {
if (streamEntries.size() <= currentStreamIndex) {
- Preconditions.checkNotNull(ksmClient);
+ Preconditions.checkNotNull(omClient);
// allocate a new block, if a exception happens, log an error and
// throw exception to the caller directly, and the write fails.
try {
@@ -286,7 +286,7 @@ public synchronized void write(byte[] b, int off, int len)
}
/**
- * Contact KSM to get a new block. Set the new block with the index (e.g.
+ * Contact OM to get a new block. Set the new block with the index (e.g.
* first block has index = 0, second has index = 1 etc.)
*
* The returned block is made to new ChunkOutputStreamEntry to write.
@@ -295,7 +295,7 @@ public synchronized void write(byte[] b, int off, int len)
* @throws IOException
*/
private void allocateNewBlock(int index) throws IOException {
- KsmKeyLocationInfo subKeyInfo = ksmClient.allocateBlock(keyArgs, openID);
+ OmKeyLocationInfo subKeyInfo = omClient.allocateBlock(keyArgs, openID);
checkKeyLocationInfo(subKeyInfo);
}
@@ -311,7 +311,7 @@ public synchronized void flush() throws IOException {
}
/**
- * Commit the key to KSM, this will add the blocks as the new key blocks.
+ * Commit the key to OM, this will add the blocks as the new key blocks.
*
* @throws IOException
*/
@@ -329,7 +329,7 @@ public synchronized void close() throws IOException {
if (keyArgs != null) {
// in test, this could be null
keyArgs.setDataSize(byteOffset);
- ksmClient.commitKey(keyArgs, openID);
+ omClient.commitKey(keyArgs, openID);
} else {
LOG.warn("Closing ChunkGroupOutputStream, but key args is null");
}
@@ -342,7 +342,7 @@ public static class Builder {
private OpenKeySession openHandler;
private XceiverClientManager xceiverManager;
private StorageContainerLocationProtocolClientSideTranslatorPB scmClient;
- private KeySpaceManagerProtocolClientSideTranslatorPB ksmClient;
+ private OzoneManagerProtocolClientSideTranslatorPB omClient;
private int chunkSize;
private String requestID;
private ReplicationType type;
@@ -364,9 +364,9 @@ public Builder setScmClient(
return this;
}
- public Builder setKsmClient(
- KeySpaceManagerProtocolClientSideTranslatorPB client) {
- this.ksmClient = client;
+ public Builder setOmClient(
+ OzoneManagerProtocolClientSideTranslatorPB client) {
+ this.omClient = client;
return this;
}
@@ -392,7 +392,7 @@ public Builder setFactor(ReplicationFactor replicationFactor) {
public ChunkGroupOutputStream build() throws IOException {
return new ChunkGroupOutputStream(openHandler, xceiverManager, scmClient,
- ksmClient, chunkSize, requestID, factor, type);
+ omClient, chunkSize, requestID, factor, type);
}
}
diff --git a/hadoop-ozone/client/src/main/java/org/apache/hadoop/ozone/client/rest/DefaultRestServerSelector.java b/hadoop-ozone/client/src/main/java/org/apache/hadoop/ozone/client/rest/DefaultRestServerSelector.java
index 93b3417b4b..abdc2fbe19 100644
--- a/hadoop-ozone/client/src/main/java/org/apache/hadoop/ozone/client/rest/DefaultRestServerSelector.java
+++ b/hadoop-ozone/client/src/main/java/org/apache/hadoop/ozone/client/rest/DefaultRestServerSelector.java
@@ -18,7 +18,7 @@
package org.apache.hadoop.ozone.client.rest;
-import org.apache.hadoop.ozone.ksm.helpers.ServiceInfo;
+import org.apache.hadoop.ozone.om.helpers.ServiceInfo;
import java.util.List;
import java.util.Random;
diff --git a/hadoop-ozone/client/src/main/java/org/apache/hadoop/ozone/client/rest/RestClient.java b/hadoop-ozone/client/src/main/java/org/apache/hadoop/ozone/client/rest/RestClient.java
index 6e3f617cd6..78fbe8d1f7 100644
--- a/hadoop-ozone/client/src/main/java/org/apache/hadoop/ozone/client/rest/RestClient.java
+++ b/hadoop-ozone/client/src/main/java/org/apache/hadoop/ozone/client/rest/RestClient.java
@@ -45,10 +45,9 @@
import org.apache.hadoop.ozone.client.rest.response.BucketInfo;
import org.apache.hadoop.ozone.client.rest.response.KeyInfo;
import org.apache.hadoop.ozone.client.rest.response.VolumeInfo;
-import org.apache.hadoop.ozone.ksm.KSMConfigKeys;
-import org.apache.hadoop.ozone.ksm.helpers.ServiceInfo;
-import org.apache.hadoop.ozone.protocol.proto
- .KeySpaceManagerProtocolProtos.ServicePort;
+import org.apache.hadoop.ozone.om.OMConfigKeys;
+import org.apache.hadoop.ozone.om.helpers.ServiceInfo;
+import org.apache.hadoop.ozone.protocol.proto.OzoneManagerProtocolProtos.ServicePort;
import org.apache.hadoop.ozone.web.response.ListBuckets;
import org.apache.hadoop.ozone.web.response.ListKeys;
import org.apache.hadoop.ozone.web.response.ListVolumes;
@@ -152,8 +151,8 @@ public RestClient(Configuration conf)
.build())
.build();
this.ugi = UserGroupInformation.getCurrentUser();
- this.userRights = conf.getEnum(KSMConfigKeys.OZONE_KSM_USER_RIGHTS,
- KSMConfigKeys.OZONE_KSM_USER_RIGHTS_DEFAULT);
+ this.userRights = conf.getEnum(OMConfigKeys.OZONE_OM_USER_RIGHTS,
+ OMConfigKeys.OZONE_OM_USER_RIGHTS_DEFAULT);
// TODO: Add new configuration parameter to configure RestServerSelector.
RestServerSelector defaultSelector = new DefaultRestServerSelector();
@@ -171,11 +170,11 @@ public RestClient(Configuration conf)
private InetSocketAddress getOzoneRestServerAddress(
RestServerSelector selector) throws IOException {
- String httpAddress = conf.get(KSMConfigKeys.OZONE_KSM_HTTP_ADDRESS_KEY);
+ String httpAddress = conf.get(OMConfigKeys.OZONE_OM_HTTP_ADDRESS_KEY);
if (httpAddress == null) {
throw new IllegalArgumentException(
- KSMConfigKeys.OZONE_KSM_HTTP_ADDRESS_KEY + " must be defined. See" +
+ OMConfigKeys.OZONE_OM_HTTP_ADDRESS_KEY + " must be defined. See" +
" https://wiki.apache.org/hadoop/Ozone#Configuration for" +
" details on configuring Ozone.");
}
diff --git a/hadoop-ozone/client/src/main/java/org/apache/hadoop/ozone/client/rest/RestServerSelector.java b/hadoop-ozone/client/src/main/java/org/apache/hadoop/ozone/client/rest/RestServerSelector.java
index 54e219b92b..fbd6eb8ea9 100644
--- a/hadoop-ozone/client/src/main/java/org/apache/hadoop/ozone/client/rest/RestServerSelector.java
+++ b/hadoop-ozone/client/src/main/java/org/apache/hadoop/ozone/client/rest/RestServerSelector.java
@@ -18,7 +18,7 @@
package org.apache.hadoop.ozone.client.rest;
-import org.apache.hadoop.ozone.ksm.helpers.ServiceInfo;
+import org.apache.hadoop.ozone.om.helpers.ServiceInfo;
import java.util.List;
diff --git a/hadoop-ozone/client/src/main/java/org/apache/hadoop/ozone/client/rpc/RpcClient.java b/hadoop-ozone/client/src/main/java/org/apache/hadoop/ozone/client/rpc/RpcClient.java
index 43b94a1529..fc70514453 100644
--- a/hadoop-ozone/client/src/main/java/org/apache/hadoop/ozone/client/rpc/RpcClient.java
+++ b/hadoop-ozone/client/src/main/java/org/apache/hadoop/ozone/client/rpc/RpcClient.java
@@ -27,7 +27,7 @@
import org.apache.hadoop.ipc.Client;
import org.apache.hadoop.ipc.ProtobufRpcEngine;
import org.apache.hadoop.ipc.RPC;
-import org.apache.hadoop.ozone.KsmUtils;
+import org.apache.hadoop.ozone.OmUtils;
import org.apache.hadoop.ozone.OzoneConsts;
import org.apache.hadoop.ozone.client.BucketArgs;
import org.apache.hadoop.ozone.client.OzoneBucket;
@@ -43,24 +43,22 @@
import org.apache.hadoop.ozone.client.io.OzoneInputStream;
import org.apache.hadoop.ozone.client.io.OzoneOutputStream;
import org.apache.hadoop.ozone.client.protocol.ClientProtocol;
-import org.apache.hadoop.ozone.ksm.helpers.KsmBucketArgs;
-import org.apache.hadoop.ozone.ksm.helpers.KsmBucketInfo;
-import org.apache.hadoop.ozone.ksm.helpers.KsmKeyArgs;
-import org.apache.hadoop.ozone.ksm.helpers.KsmKeyInfo;
-import org.apache.hadoop.ozone.ksm.helpers.KsmVolumeArgs;
-import org.apache.hadoop.ozone.ksm.helpers.OpenKeySession;
-import org.apache.hadoop.ozone.ksm.helpers.ServiceInfo;
-import org.apache.hadoop.ozone.ksm.protocolPB
- .KeySpaceManagerProtocolClientSideTranslatorPB;
-import org.apache.hadoop.ozone.ksm.protocolPB
- .KeySpaceManagerProtocolPB;
+import org.apache.hadoop.ozone.om.helpers.OmBucketArgs;
+import org.apache.hadoop.ozone.om.helpers.OmBucketInfo;
+import org.apache.hadoop.ozone.om.helpers.OmKeyArgs;
+import org.apache.hadoop.ozone.om.helpers.OmKeyInfo;
+import org.apache.hadoop.ozone.om.helpers.OmVolumeArgs;
+import org.apache.hadoop.ozone.om.helpers.OpenKeySession;
+import org.apache.hadoop.ozone.om.helpers.ServiceInfo;
+import org.apache.hadoop.ozone.om.protocolPB.OzoneManagerProtocolClientSideTranslatorPB;
+import org.apache.hadoop.ozone.om.protocolPB.OzoneManagerProtocolPB;
import org.apache.hadoop.net.NetUtils;
import org.apache.hadoop.ozone.OzoneAcl;
-import org.apache.hadoop.ozone.ksm.KSMConfigKeys;
+import org.apache.hadoop.ozone.om.OMConfigKeys;
import org.apache.hadoop.ozone.protocol.proto
- .KeySpaceManagerProtocolProtos.ServicePort;
+ .OzoneManagerProtocolProtos.ServicePort;
import org.apache.hadoop.hdds.protocol.proto.HddsProtos;
-import org.apache.hadoop.ozone.protocolPB.KSMPBHelper;
+import org.apache.hadoop.ozone.protocolPB.OMPBHelper;
import org.apache.hadoop.hdds.scm.ScmConfigKeys;
import org.apache.hadoop.hdds.scm.XceiverClientManager;
import org.apache.hadoop.hdds.scm.protocolPB
@@ -80,7 +78,7 @@
import java.util.stream.Collectors;
/**
- * Ozone RPC Client Implementation, it connects to KSM, SCM and DataNode
+ * Ozone RPC Client Implementation, it connects to OM, SCM and DataNode
* to execute client calls. This uses RPC protocol for communication
* with the servers.
*/
@@ -92,8 +90,8 @@ public class RpcClient implements ClientProtocol {
private final OzoneConfiguration conf;
private final StorageContainerLocationProtocolClientSideTranslatorPB
storageContainerLocationClient;
- private final KeySpaceManagerProtocolClientSideTranslatorPB
- keySpaceManagerClient;
+ private final OzoneManagerProtocolClientSideTranslatorPB
+ ozoneManagerClient;
private final XceiverClientManager xceiverClientManager;
private final int chunkSize;
private final UserGroupInformation ugi;
@@ -109,20 +107,20 @@ public RpcClient(Configuration conf) throws IOException {
Preconditions.checkNotNull(conf);
this.conf = new OzoneConfiguration(conf);
this.ugi = UserGroupInformation.getCurrentUser();
- this.userRights = conf.getEnum(KSMConfigKeys.OZONE_KSM_USER_RIGHTS,
- KSMConfigKeys.OZONE_KSM_USER_RIGHTS_DEFAULT);
- this.groupRights = conf.getEnum(KSMConfigKeys.OZONE_KSM_GROUP_RIGHTS,
- KSMConfigKeys.OZONE_KSM_GROUP_RIGHTS_DEFAULT);
- long ksmVersion =
- RPC.getProtocolVersion(KeySpaceManagerProtocolPB.class);
- InetSocketAddress ksmAddress = KsmUtils
- .getKsmAddressForClients(conf);
- RPC.setProtocolEngine(conf, KeySpaceManagerProtocolPB.class,
+ this.userRights = conf.getEnum(OMConfigKeys.OZONE_OM_USER_RIGHTS,
+ OMConfigKeys.OZONE_OM_USER_RIGHTS_DEFAULT);
+ this.groupRights = conf.getEnum(OMConfigKeys.OZONE_OM_GROUP_RIGHTS,
+ OMConfigKeys.OZONE_OM_GROUP_RIGHTS_DEFAULT);
+ long omVersion =
+ RPC.getProtocolVersion(OzoneManagerProtocolPB.class);
+ InetSocketAddress omAddress = OmUtils
+ .getOmAddressForClients(conf);
+ RPC.setProtocolEngine(conf, OzoneManagerProtocolPB.class,
ProtobufRpcEngine.class);
- this.keySpaceManagerClient =
- new KeySpaceManagerProtocolClientSideTranslatorPB(
- RPC.getProxy(KeySpaceManagerProtocolPB.class, ksmVersion,
- ksmAddress, UserGroupInformation.getCurrentUser(), conf,
+ this.ozoneManagerClient =
+ new OzoneManagerProtocolClientSideTranslatorPB(
+ RPC.getProxy(OzoneManagerProtocolPB.class, omVersion,
+ omAddress, UserGroupInformation.getCurrentUser(), conf,
NetUtils.getDefaultSocketFactory(conf),
Client.getRpcTimeout(conf)));
@@ -155,7 +153,7 @@ public RpcClient(Configuration conf) throws IOException {
}
private InetSocketAddress getScmAddressForClient() throws IOException {
- List services = keySpaceManagerClient.getServiceList();
+ List services = ozoneManagerClient.getServiceList();
ServiceInfo scmInfo = services.stream().filter(
a -> a.getNodeType().equals(HddsProtos.NodeType.SCM))
.collect(Collectors.toList()).get(0);
@@ -195,7 +193,7 @@ public void createVolume(String volumeName, VolumeArgs volArgs)
listOfAcls.addAll(volArgs.getAcls());
}
- KsmVolumeArgs.Builder builder = KsmVolumeArgs.newBuilder();
+ OmVolumeArgs.Builder builder = OmVolumeArgs.newBuilder();
builder.setVolume(volumeName);
builder.setAdminName(admin);
builder.setOwnerName(owner);
@@ -204,12 +202,12 @@ public void createVolume(String volumeName, VolumeArgs volArgs)
//Remove duplicates and add ACLs
for (OzoneAcl ozoneAcl :
listOfAcls.stream().distinct().collect(Collectors.toList())) {
- builder.addOzoneAcls(KSMPBHelper.convertOzoneAcl(ozoneAcl));
+ builder.addOzoneAcls(OMPBHelper.convertOzoneAcl(ozoneAcl));
}
LOG.info("Creating Volume: {}, with {} as owner and quota set to {} bytes.",
volumeName, owner, quota);
- keySpaceManagerClient.createVolume(builder.build());
+ ozoneManagerClient.createVolume(builder.build());
}
@Override
@@ -217,7 +215,7 @@ public void setVolumeOwner(String volumeName, String owner)
throws IOException {
HddsClientUtils.verifyResourceName(volumeName);
Preconditions.checkNotNull(owner);
- keySpaceManagerClient.setOwner(volumeName, owner);
+ ozoneManagerClient.setOwner(volumeName, owner);
}
@Override
@@ -226,14 +224,14 @@ public void setVolumeQuota(String volumeName, OzoneQuota quota)
HddsClientUtils.verifyResourceName(volumeName);
Preconditions.checkNotNull(quota);
long quotaInBytes = quota.sizeInBytes();
- keySpaceManagerClient.setQuota(volumeName, quotaInBytes);
+ ozoneManagerClient.setQuota(volumeName, quotaInBytes);
}
@Override
public OzoneVolume getVolumeDetails(String volumeName)
throws IOException {
HddsClientUtils.verifyResourceName(volumeName);
- KsmVolumeArgs volume = keySpaceManagerClient.getVolumeInfo(volumeName);
+ OmVolumeArgs volume = ozoneManagerClient.getVolumeInfo(volumeName);
return new OzoneVolume(
conf,
this,
@@ -243,7 +241,7 @@ public OzoneVolume getVolumeDetails(String volumeName)
volume.getQuotaInBytes(),
volume.getCreationTime(),
volume.getAclMap().ozoneAclGetProtobuf().stream().
- map(KSMPBHelper::convertOzoneAcl).collect(Collectors.toList()));
+ map(OMPBHelper::convertOzoneAcl).collect(Collectors.toList()));
}
@Override
@@ -255,14 +253,14 @@ public boolean checkVolumeAccess(String volumeName, OzoneAcl acl)
@Override
public void deleteVolume(String volumeName) throws IOException {
HddsClientUtils.verifyResourceName(volumeName);
- keySpaceManagerClient.deleteVolume(volumeName);
+ ozoneManagerClient.deleteVolume(volumeName);
}
@Override
public List listVolumes(String volumePrefix, String prevVolume,
int maxListResult)
throws IOException {
- List volumes = keySpaceManagerClient.listAllVolumes(
+ List volumes = ozoneManagerClient.listAllVolumes(
volumePrefix, prevVolume, maxListResult);
return volumes.stream().map(volume -> new OzoneVolume(
@@ -274,7 +272,7 @@ public List listVolumes(String volumePrefix, String prevVolume,
volume.getQuotaInBytes(),
volume.getCreationTime(),
volume.getAclMap().ozoneAclGetProtobuf().stream().
- map(KSMPBHelper::convertOzoneAcl).collect(Collectors.toList())))
+ map(OMPBHelper::convertOzoneAcl).collect(Collectors.toList())))
.collect(Collectors.toList());
}
@@ -282,7 +280,7 @@ public List listVolumes(String volumePrefix, String prevVolume,
public List listVolumes(String user, String volumePrefix,
String prevVolume, int maxListResult)
throws IOException {
- List volumes = keySpaceManagerClient.listVolumeByUser(
+ List volumes = ozoneManagerClient.listVolumeByUser(
user, volumePrefix, prevVolume, maxListResult);
return volumes.stream().map(volume -> new OzoneVolume(
@@ -294,7 +292,7 @@ public List listVolumes(String user, String volumePrefix,
volume.getQuotaInBytes(),
volume.getCreationTime(),
volume.getAclMap().ozoneAclGetProtobuf().stream().
- map(KSMPBHelper::convertOzoneAcl).collect(Collectors.toList())))
+ map(OMPBHelper::convertOzoneAcl).collect(Collectors.toList())))
.collect(Collectors.toList());
}
@@ -329,7 +327,7 @@ public void createBucket(
listOfAcls.addAll(bucketArgs.getAcls());
}
- KsmBucketInfo.Builder builder = KsmBucketInfo.newBuilder();
+ OmBucketInfo.Builder builder = OmBucketInfo.newBuilder();
builder.setVolumeName(volumeName)
.setBucketName(bucketName)
.setIsVersionEnabled(isVersionEnabled)
@@ -339,7 +337,7 @@ public void createBucket(
LOG.info("Creating Bucket: {}/{}, with Versioning {} and " +
"Storage Type set to {}", volumeName, bucketName, isVersionEnabled,
storageType);
- keySpaceManagerClient.createBucket(builder.build());
+ ozoneManagerClient.createBucket(builder.build());
}
@Override
@@ -348,11 +346,11 @@ public void addBucketAcls(
throws IOException {
HddsClientUtils.verifyResourceName(volumeName, bucketName);
Preconditions.checkNotNull(addAcls);
- KsmBucketArgs.Builder builder = KsmBucketArgs.newBuilder();
+ OmBucketArgs.Builder builder = OmBucketArgs.newBuilder();
builder.setVolumeName(volumeName)
.setBucketName(bucketName)
.setAddAcls(addAcls);
- keySpaceManagerClient.setBucketProperty(builder.build());
+ ozoneManagerClient.setBucketProperty(builder.build());
}
@Override
@@ -361,11 +359,11 @@ public void removeBucketAcls(
throws IOException {
HddsClientUtils.verifyResourceName(volumeName, bucketName);
Preconditions.checkNotNull(removeAcls);
- KsmBucketArgs.Builder builder = KsmBucketArgs.newBuilder();
+ OmBucketArgs.Builder builder = OmBucketArgs.newBuilder();
builder.setVolumeName(volumeName)
.setBucketName(bucketName)
.setRemoveAcls(removeAcls);
- keySpaceManagerClient.setBucketProperty(builder.build());
+ ozoneManagerClient.setBucketProperty(builder.build());
}
@Override
@@ -374,11 +372,11 @@ public void setBucketVersioning(
throws IOException {
HddsClientUtils.verifyResourceName(volumeName, bucketName);
Preconditions.checkNotNull(versioning);
- KsmBucketArgs.Builder builder = KsmBucketArgs.newBuilder();
+ OmBucketArgs.Builder builder = OmBucketArgs.newBuilder();
builder.setVolumeName(volumeName)
.setBucketName(bucketName)
.setIsVersionEnabled(versioning);
- keySpaceManagerClient.setBucketProperty(builder.build());
+ ozoneManagerClient.setBucketProperty(builder.build());
}
@Override
@@ -387,18 +385,18 @@ public void setBucketStorageType(
throws IOException {
HddsClientUtils.verifyResourceName(volumeName, bucketName);
Preconditions.checkNotNull(storageType);
- KsmBucketArgs.Builder builder = KsmBucketArgs.newBuilder();
+ OmBucketArgs.Builder builder = OmBucketArgs.newBuilder();
builder.setVolumeName(volumeName)
.setBucketName(bucketName)
.setStorageType(storageType);
- keySpaceManagerClient.setBucketProperty(builder.build());
+ ozoneManagerClient.setBucketProperty(builder.build());
}
@Override
public void deleteBucket(
String volumeName, String bucketName) throws IOException {
HddsClientUtils.verifyResourceName(volumeName, bucketName);
- keySpaceManagerClient.deleteBucket(volumeName, bucketName);
+ ozoneManagerClient.deleteBucket(volumeName, bucketName);
}
@Override
@@ -411,8 +409,8 @@ public void checkBucketAccess(
public OzoneBucket getBucketDetails(
String volumeName, String bucketName) throws IOException {
HddsClientUtils.verifyResourceName(volumeName, bucketName);
- KsmBucketInfo bucketArgs =
- keySpaceManagerClient.getBucketInfo(volumeName, bucketName);
+ OmBucketInfo bucketArgs =
+ ozoneManagerClient.getBucketInfo(volumeName, bucketName);
return new OzoneBucket(
conf,
this,
@@ -428,7 +426,7 @@ public OzoneBucket getBucketDetails(
public List listBuckets(String volumeName, String bucketPrefix,
String prevBucket, int maxListResult)
throws IOException {
- List buckets = keySpaceManagerClient.listBuckets(
+ List buckets = ozoneManagerClient.listBuckets(
volumeName, prevBucket, bucketPrefix, maxListResult);
return buckets.stream().map(bucket -> new OzoneBucket(
@@ -451,7 +449,7 @@ public OzoneOutputStream createKey(
HddsClientUtils.verifyResourceName(volumeName, bucketName);
HddsClientUtils.checkNotNull(keyName, type, factor);
String requestId = UUID.randomUUID().toString();
- KsmKeyArgs keyArgs = new KsmKeyArgs.Builder()
+ OmKeyArgs keyArgs = new OmKeyArgs.Builder()
.setVolumeName(volumeName)
.setBucketName(bucketName)
.setKeyName(keyName)
@@ -460,13 +458,13 @@ public OzoneOutputStream createKey(
.setFactor(HddsProtos.ReplicationFactor.valueOf(factor.getValue()))
.build();
- OpenKeySession openKey = keySpaceManagerClient.openKey(keyArgs);
+ OpenKeySession openKey = ozoneManagerClient.openKey(keyArgs);
ChunkGroupOutputStream groupOutputStream =
new ChunkGroupOutputStream.Builder()
.setHandler(openKey)
.setXceiverClientManager(xceiverClientManager)
.setScmClient(storageContainerLocationClient)
- .setKsmClient(keySpaceManagerClient)
+ .setOmClient(ozoneManagerClient)
.setChunkSize(chunkSize)
.setRequestID(requestId)
.setType(HddsProtos.ReplicationType.valueOf(type.toString()))
@@ -485,14 +483,14 @@ public OzoneInputStream getKey(
HddsClientUtils.verifyResourceName(volumeName, bucketName);
Preconditions.checkNotNull(keyName);
String requestId = UUID.randomUUID().toString();
- KsmKeyArgs keyArgs = new KsmKeyArgs.Builder()
+ OmKeyArgs keyArgs = new OmKeyArgs.Builder()
.setVolumeName(volumeName)
.setBucketName(bucketName)
.setKeyName(keyName)
.build();
- KsmKeyInfo keyInfo = keySpaceManagerClient.lookupKey(keyArgs);
+ OmKeyInfo keyInfo = ozoneManagerClient.lookupKey(keyArgs);
LengthInputStream lengthInputStream =
- ChunkGroupInputStream.getFromKsmKeyInfo(
+ ChunkGroupInputStream.getFromOmKeyInfo(
keyInfo, xceiverClientManager, storageContainerLocationClient,
requestId);
return new OzoneInputStream(
@@ -505,12 +503,12 @@ public void deleteKey(
throws IOException {
HddsClientUtils.verifyResourceName(volumeName, bucketName);
Preconditions.checkNotNull(keyName);
- KsmKeyArgs keyArgs = new KsmKeyArgs.Builder()
+ OmKeyArgs keyArgs = new OmKeyArgs.Builder()
.setVolumeName(volumeName)
.setBucketName(bucketName)
.setKeyName(keyName)
.build();
- keySpaceManagerClient.deleteKey(keyArgs);
+ ozoneManagerClient.deleteKey(keyArgs);
}
@Override
@@ -518,12 +516,12 @@ public void renameKey(String volumeName, String bucketName,
String fromKeyName, String toKeyName) throws IOException {
HddsClientUtils.verifyResourceName(volumeName, bucketName);
HddsClientUtils.checkNotNull(fromKeyName, toKeyName);
- KsmKeyArgs keyArgs = new KsmKeyArgs.Builder()
+ OmKeyArgs keyArgs = new OmKeyArgs.Builder()
.setVolumeName(volumeName)
.setBucketName(bucketName)
.setKeyName(fromKeyName)
.build();
- keySpaceManagerClient.renameKey(keyArgs, toKeyName);
+ ozoneManagerClient.renameKey(keyArgs, toKeyName);
}
@Override
@@ -531,7 +529,7 @@ public List listKeys(String volumeName, String bucketName,
String keyPrefix, String prevKey,
int maxListResult)
throws IOException {
- List keys = keySpaceManagerClient.listKeys(
+ List keys = ozoneManagerClient.listKeys(
volumeName, bucketName, prevKey, keyPrefix, maxListResult);
return keys.stream().map(key -> new OzoneKey(
@@ -551,12 +549,12 @@ public OzoneKey getKeyDetails(
Preconditions.checkNotNull(volumeName);
Preconditions.checkNotNull(bucketName);
Preconditions.checkNotNull(keyName);
- KsmKeyArgs keyArgs = new KsmKeyArgs.Builder()
+ OmKeyArgs keyArgs = new OmKeyArgs.Builder()
.setVolumeName(volumeName)
.setBucketName(bucketName)
.setKeyName(keyName)
.build();
- KsmKeyInfo keyInfo = keySpaceManagerClient.lookupKey(keyArgs);
+ OmKeyInfo keyInfo = ozoneManagerClient.lookupKey(keyArgs);
return new OzoneKey(keyInfo.getVolumeName(),
keyInfo.getBucketName(),
keyInfo.getKeyName(),
@@ -568,7 +566,7 @@ public OzoneKey getKeyDetails(
@Override
public void close() throws IOException {
IOUtils.cleanupWithLogger(LOG, storageContainerLocationClient);
- IOUtils.cleanupWithLogger(LOG, keySpaceManagerClient);
+ IOUtils.cleanupWithLogger(LOG, ozoneManagerClient);
IOUtils.cleanupWithLogger(LOG, xceiverClientManager);
}
}
diff --git a/hadoop-ozone/client/src/test/java/org/apache/hadoop/ozone/client/TestHddsClientUtils.java b/hadoop-ozone/client/src/test/java/org/apache/hadoop/ozone/client/TestHddsClientUtils.java
index a270f61a81..3aefe8ac23 100644
--- a/hadoop-ozone/client/src/test/java/org/apache/hadoop/ozone/client/TestHddsClientUtils.java
+++ b/hadoop-ozone/client/src/test/java/org/apache/hadoop/ozone/client/TestHddsClientUtils.java
@@ -20,7 +20,7 @@
import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.hdds.conf.OzoneConfiguration;
-import org.apache.hadoop.ozone.ksm.KSMConfigKeys;
+import org.apache.hadoop.ozone.om.OMConfigKeys;
import org.apache.hadoop.hdds.scm.ScmConfigKeys;
import org.junit.Rule;
import org.junit.Test;
@@ -30,7 +30,7 @@
import java.net.InetSocketAddress;
import static org.apache.hadoop.hdds.HddsUtils.getScmAddressForClients;
-import static org.apache.hadoop.ozone.KsmUtils.getKsmAddress;
+import static org.apache.hadoop.ozone.OmUtils.getOmAddress;
import static org.hamcrest.core.Is.is;
import static org.junit.Assert.assertThat;
@@ -79,27 +79,27 @@ public void testGetScmClientAddress() {
}
@Test
- public void testGetKSMAddress() {
+ public void testGetOmAddress() {
final Configuration conf = new OzoneConfiguration();
// First try a client address with just a host name. Verify it falls
// back to the default port.
- conf.set(KSMConfigKeys.OZONE_KSM_ADDRESS_KEY, "1.2.3.4");
- InetSocketAddress addr = getKsmAddress(conf);
+ conf.set(OMConfigKeys.OZONE_OM_ADDRESS_KEY, "1.2.3.4");
+ InetSocketAddress addr = getOmAddress(conf);
assertThat(addr.getHostString(), is("1.2.3.4"));
- assertThat(addr.getPort(), is(KSMConfigKeys.OZONE_KSM_PORT_DEFAULT));
+ assertThat(addr.getPort(), is(OMConfigKeys.OZONE_OM_PORT_DEFAULT));
// Next try a client address with just a host name and port. Verify the port
- // is ignored and the default KSM port is used.
- conf.set(KSMConfigKeys.OZONE_KSM_ADDRESS_KEY, "1.2.3.4:100");
- addr = getKsmAddress(conf);
+ // is ignored and the default OM port is used.
+ conf.set(OMConfigKeys.OZONE_OM_ADDRESS_KEY, "1.2.3.4:100");
+ addr = getOmAddress(conf);
assertThat(addr.getHostString(), is("1.2.3.4"));
assertThat(addr.getPort(), is(100));
// Assert the we are able to use default configs if no value is specified.
- conf.set(KSMConfigKeys.OZONE_KSM_ADDRESS_KEY, "");
- addr = getKsmAddress(conf);
+ conf.set(OMConfigKeys.OZONE_OM_ADDRESS_KEY, "");
+ addr = getOmAddress(conf);
assertThat(addr.getHostString(), is("0.0.0.0"));
- assertThat(addr.getPort(), is(KSMConfigKeys.OZONE_KSM_PORT_DEFAULT));
+ assertThat(addr.getPort(), is(OMConfigKeys.OZONE_OM_PORT_DEFAULT));
}
}
diff --git a/hadoop-ozone/common/pom.xml b/hadoop-ozone/common/pom.xml
index d8581d1925..83d023e9fd 100644
--- a/hadoop-ozone/common/pom.xml
+++ b/hadoop-ozone/common/pom.xml
@@ -69,7 +69,7 @@ http://maven.apache.org/xsd/maven-4.0.0.xsd">
diff --git a/hadoop-ozone/common/src/main/bin/ozone b/hadoop-ozone/common/src/main/bin/ozone
index 390f0895b7..9495eff0a9 100755
--- a/hadoop-ozone/common/src/main/bin/ozone
+++ b/hadoop-ozone/common/src/main/bin/ozone
@@ -38,10 +38,9 @@ function hadoop_usage
hadoop_add_subcommand "envvars" client "display computed Hadoop environment variables"
hadoop_add_subcommand "freon" client "runs an ozone data generator"
hadoop_add_subcommand "genesis" client "runs a collection of ozone benchmarks to help with tuning."
- hadoop_add_subcommand "getozoneconf" client "get ozone config values from
- configuration"
+ hadoop_add_subcommand "getozoneconf" client "get ozone config values from configuration"
hadoop_add_subcommand "jmxget" admin "get JMX exported values from NameNode or DataNode."
- hadoop_add_subcommand "ksm" daemon "Ozone keyspace manager"
+ hadoop_add_subcommand "om" daemon "Ozone Manager"
hadoop_add_subcommand "o3" client "command line interface for ozone"
hadoop_add_subcommand "noz" client "ozone debug tool, convert ozone metadata into relational data"
hadoop_add_subcommand "scm" daemon "run the Storage Container Manager service"
@@ -94,9 +93,9 @@ function ozonecmd_case
getozoneconf)
HADOOP_CLASSNAME=org.apache.hadoop.ozone.freon.OzoneGetConf;
;;
- ksm)
+ om)
HADOOP_SUBCMD_SUPPORTDAEMONIZATION="true"
- HADOOP_CLASSNAME=org.apache.hadoop.ozone.ksm.KeySpaceManager
+ HADOOP_CLASSNAME=org.apache.hadoop.ozone.om.OzoneManager
;;
oz)
HADOOP_CLASSNAME=org.apache.hadoop.ozone.web.ozShell.Shell
diff --git a/hadoop-ozone/common/src/main/bin/start-ozone.sh b/hadoop-ozone/common/src/main/bin/start-ozone.sh
index 92bc4a8691..29c3674336 100644
--- a/hadoop-ozone/common/src/main/bin/start-ozone.sh
+++ b/hadoop-ozone/common/src/main/bin/start-ozone.sh
@@ -179,19 +179,19 @@ if [[ "${AUTOHA_ENABLED}" = "true" ]]; then
fi
#---------------------------------------------------------
-# Ozone keyspacemanager nodes
-KSM_NODES=$("${HADOOP_HDFS_HOME}/bin/ozone" getozoneconf -keyspacemanagers 2>/dev/null)
-echo "Starting key space manager nodes [${KSM_NODES}]"
-if [[ "${KSM_NODES}" == "0.0.0.0" ]]; then
- KSM_NODES=$(hostname)
+# Ozone ozonemanager nodes
+OM_NODES=$("${HADOOP_HDFS_HOME}/bin/ozone" getozoneconf -ozonemanagers 2>/dev/null)
+echo "Starting Ozone Manager nodes [${OM_NODES}]"
+if [[ "${OM_NODES}" == "0.0.0.0" ]]; then
+ OM_NODES=$(hostname)
fi
-hadoop_uservar_su hdfs ksm "${HADOOP_HDFS_HOME}/bin/ozone" \
+hadoop_uservar_su hdfs om "${HADOOP_HDFS_HOME}/bin/ozone" \
--workers \
--config "${HADOOP_CONF_DIR}" \
- --hostnames "${KSM_NODES}" \
+ --hostnames "${OM_NODES}" \
--daemon start \
- ksm
+ om
HADOOP_JUMBO_RETCOUNTER=$?
diff --git a/hadoop-ozone/common/src/main/bin/stop-ozone.sh b/hadoop-ozone/common/src/main/bin/stop-ozone.sh
index be55be4e97..5f5faf0153 100644
--- a/hadoop-ozone/common/src/main/bin/stop-ozone.sh
+++ b/hadoop-ozone/common/src/main/bin/stop-ozone.sh
@@ -73,19 +73,19 @@ else
fi
#---------------------------------------------------------
-# Ozone keyspacemanager nodes
-KSM_NODES=$("${HADOOP_HDFS_HOME}/bin/ozone" getozoneconf -keyspacemanagers 2>/dev/null)
-echo "Stopping key space manager nodes [${KSM_NODES}]"
-if [[ "${KSM_NODES}" == "0.0.0.0" ]]; then
- KSM_NODES=$(hostname)
+# Ozone Manager nodes
+OM_NODES=$("${HADOOP_HDFS_HOME}/bin/ozone" getozoneconf -ozonemanagers 2>/dev/null)
+echo "Stopping Ozone Manager nodes [${OM_NODES}]"
+if [[ "${OM_NODES}" == "0.0.0.0" ]]; then
+ OM_NODES=$(hostname)
fi
-hadoop_uservar_su hdfs ksm "${HADOOP_HDFS_HOME}/bin/ozone" \
+hadoop_uservar_su hdfs om "${HADOOP_HDFS_HOME}/bin/ozone" \
--workers \
--config "${HADOOP_CONF_DIR}" \
- --hostnames "${KSM_NODES}" \
+ --hostnames "${OM_NODES}" \
--daemon stop \
- ksm
+ om
#---------------------------------------------------------
# Ozone storagecontainermanager nodes
diff --git a/hadoop-ozone/common/src/main/java/org/apache/hadoop/ozone/KsmUtils.java b/hadoop-ozone/common/src/main/java/org/apache/hadoop/ozone/OmUtils.java
similarity index 63%
rename from hadoop-ozone/common/src/main/java/org/apache/hadoop/ozone/KsmUtils.java
rename to hadoop-ozone/common/src/main/java/org/apache/hadoop/ozone/OmUtils.java
index 1025963aa8..097410405f 100644
--- a/hadoop-ozone/common/src/main/java/org/apache/hadoop/ozone/KsmUtils.java
+++ b/hadoop-ozone/common/src/main/java/org/apache/hadoop/ozone/OmUtils.java
@@ -25,71 +25,70 @@
import com.google.common.base.Optional;
import static org.apache.hadoop.hdds.HddsUtils.getHostNameFromConfigKeys;
import static org.apache.hadoop.hdds.HddsUtils.getPortNumberFromConfigKeys;
-import static org.apache.hadoop.ozone.ksm.KSMConfigKeys.OZONE_KSM_ADDRESS_KEY;
-import static org.apache.hadoop.ozone.ksm.KSMConfigKeys.OZONE_KSM_HTTP_ADDRESS_KEY;
-import static org.apache.hadoop.ozone.ksm.KSMConfigKeys.OZONE_KSM_HTTP_BIND_PORT_DEFAULT;
-import static org.apache.hadoop.ozone.ksm.KSMConfigKeys
- .OZONE_KSM_BIND_HOST_DEFAULT;
-import static org.apache.hadoop.ozone.ksm.KSMConfigKeys.OZONE_KSM_PORT_DEFAULT;
+import static org.apache.hadoop.ozone.om.OMConfigKeys.OZONE_OM_ADDRESS_KEY;
+import static org.apache.hadoop.ozone.om.OMConfigKeys.OZONE_OM_BIND_HOST_DEFAULT;
+import static org.apache.hadoop.ozone.om.OMConfigKeys.OZONE_OM_HTTP_ADDRESS_KEY;
+import static org.apache.hadoop.ozone.om.OMConfigKeys.OZONE_OM_HTTP_BIND_PORT_DEFAULT;
+import static org.apache.hadoop.ozone.om.OMConfigKeys.OZONE_OM_PORT_DEFAULT;
/**
- * Stateless helper functions for the server and client side of KSM
+ * Stateless helper functions for the server and client side of OM
* communication.
*/
-public final class KsmUtils {
+public final class OmUtils {
- private KsmUtils() {
+ private OmUtils() {
}
/**
- * Retrieve the socket address that is used by KSM.
+ * Retrieve the socket address that is used by OM.
* @param conf
* @return Target InetSocketAddress for the SCM service endpoint.
*/
- public static InetSocketAddress getKsmAddress(
+ public static InetSocketAddress getOmAddress(
Configuration conf) {
final Optional host = getHostNameFromConfigKeys(conf,
- OZONE_KSM_ADDRESS_KEY);
+ OZONE_OM_ADDRESS_KEY);
return NetUtils.createSocketAddr(
- host.or(OZONE_KSM_BIND_HOST_DEFAULT) + ":" +
- getKsmRpcPort(conf));
+ host.or(OZONE_OM_BIND_HOST_DEFAULT) + ":" +
+ getOmRpcPort(conf));
}
/**
* Retrieve the socket address that should be used by clients to connect
- * to KSM.
+ * to OM.
* @param conf
- * @return Target InetSocketAddress for the KSM service endpoint.
+ * @return Target InetSocketAddress for the OM service endpoint.
*/
- public static InetSocketAddress getKsmAddressForClients(
+ public static InetSocketAddress getOmAddressForClients(
Configuration conf) {
final Optional host = getHostNameFromConfigKeys(conf,
- OZONE_KSM_ADDRESS_KEY);
+ OZONE_OM_ADDRESS_KEY);
if (!host.isPresent()) {
throw new IllegalArgumentException(
- OZONE_KSM_ADDRESS_KEY + " must be defined. See" +
+ OZONE_OM_ADDRESS_KEY + " must be defined. See" +
" https://wiki.apache.org/hadoop/Ozone#Configuration for" +
" details on configuring Ozone.");
}
return NetUtils.createSocketAddr(
- host.get() + ":" + getKsmRpcPort(conf));
+ host.get() + ":" + getOmRpcPort(conf));
}
- public static int getKsmRpcPort(Configuration conf) {
+ public static int getOmRpcPort(Configuration conf) {
// If no port number is specified then we'll just try the defaultBindPort.
final Optional port = getPortNumberFromConfigKeys(conf,
- OZONE_KSM_ADDRESS_KEY);
- return port.or(OZONE_KSM_PORT_DEFAULT);
+ OZONE_OM_ADDRESS_KEY);
+ return port.or(OZONE_OM_PORT_DEFAULT);
}
- public static int getKsmRestPort(Configuration conf) {
+ public static int getOmRestPort(Configuration conf) {
// If no port number is specified then we'll just try the default
// HTTP BindPort.
final Optional port =
- getPortNumberFromConfigKeys(conf, OZONE_KSM_HTTP_ADDRESS_KEY);
- return port.or(OZONE_KSM_HTTP_BIND_PORT_DEFAULT);
+ getPortNumberFromConfigKeys(conf, OZONE_OM_HTTP_ADDRESS_KEY);
+ return port.or(OZONE_OM_HTTP_BIND_PORT_DEFAULT);
}
}
diff --git a/hadoop-ozone/common/src/main/java/org/apache/hadoop/ozone/freon/OzoneGetConf.java b/hadoop-ozone/common/src/main/java/org/apache/hadoop/ozone/freon/OzoneGetConf.java
index d5f9093128..ffbca6a2b5 100644
--- a/hadoop-ozone/common/src/main/java/org/apache/hadoop/ozone/freon/OzoneGetConf.java
+++ b/hadoop-ozone/common/src/main/java/org/apache/hadoop/ozone/freon/OzoneGetConf.java
@@ -32,7 +32,7 @@
import org.apache.hadoop.hdfs.HdfsConfiguration;
import org.apache.hadoop.hdds.HddsUtils;
import org.apache.hadoop.hdds.conf.OzoneConfiguration;
-import org.apache.hadoop.ozone.KsmUtils;
+import org.apache.hadoop.ozone.OmUtils;
import org.apache.hadoop.security.SecurityUtil;
import org.apache.hadoop.util.StringUtils;
import org.apache.hadoop.util.Tool;
@@ -53,8 +53,8 @@ enum Command {
EXCLUDE_FILE("-excludeFile",
"gets the exclude file path that defines the datanodes " +
"that need to decommissioned."),
- KEYSPACEMANAGER("-keyspacemanagers",
- "gets list of ozone key space manager nodes in the cluster"),
+ OZONEMANAGER("-ozonemanagers",
+ "gets list of Ozone Manager nodes in the cluster"),
STORAGECONTAINERMANAGER("-storagecontainermanagers",
"gets list of ozone storage container manager nodes in the cluster"),
CONFKEY("-confKey [key]", "gets a specific key from the configuration");
@@ -63,8 +63,8 @@ enum Command {
static {
HANDLERS = new HashMap();
- HANDLERS.put(StringUtils.toLowerCase(KEYSPACEMANAGER.getName()),
- new KeySpaceManagersCommandHandler());
+ HANDLERS.put(StringUtils.toLowerCase(OZONEMANAGER.getName()),
+ new OzoneManagersCommandHandler());
HANDLERS.put(StringUtils.toLowerCase(STORAGECONTAINERMANAGER.getName()),
new StorageContainerManagersCommandHandler());
HANDLERS.put(StringUtils.toLowerCase(CONFKEY.getName()),
@@ -245,13 +245,13 @@ public int doWorkInternal(OzoneGetConf tool, String[] args)
}
/**
- * Handler for {@link Command#KEYSPACEMANAGER}.
+ * Handler for {@link Command#OZONEMANAGER}.
*/
- static class KeySpaceManagersCommandHandler extends CommandHandler {
+ static class OzoneManagersCommandHandler extends CommandHandler {
@Override
public int doWorkInternal(OzoneGetConf tool, String[] args)
throws IOException {
- tool.printOut(KsmUtils.getKsmAddress(tool.getConf()).getHostName());
+ tool.printOut(OmUtils.getOmAddress(tool.getConf()).getHostName());
return 0;
}
}
diff --git a/hadoop-ozone/common/src/main/java/org/apache/hadoop/ozone/ksm/KSMConfigKeys.java b/hadoop-ozone/common/src/main/java/org/apache/hadoop/ozone/ksm/KSMConfigKeys.java
deleted file mode 100644
index 75cf613ba6..0000000000
--- a/hadoop-ozone/common/src/main/java/org/apache/hadoop/ozone/ksm/KSMConfigKeys.java
+++ /dev/null
@@ -1,81 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with this
- * work for additional information regarding copyright ownership. The ASF
- * licenses this file to you 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
- *
- * 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 org.apache.hadoop.ozone.ksm;
-
-import org.apache.hadoop.ozone.OzoneAcl;
-/**
- * KSM Constants.
- */
-public final class KSMConfigKeys {
- /**
- * Never constructed.
- */
- private KSMConfigKeys() {
- }
-
-
- public static final String OZONE_KSM_HANDLER_COUNT_KEY =
- "ozone.ksm.handler.count.key";
- public static final int OZONE_KSM_HANDLER_COUNT_DEFAULT = 20;
-
- public static final String OZONE_KSM_ADDRESS_KEY =
- "ozone.ksm.address";
- public static final String OZONE_KSM_BIND_HOST_DEFAULT =
- "0.0.0.0";
- public static final int OZONE_KSM_PORT_DEFAULT = 9862;
-
- public static final String OZONE_KSM_HTTP_ENABLED_KEY =
- "ozone.ksm.http.enabled";
- public static final String OZONE_KSM_HTTP_BIND_HOST_KEY =
- "ozone.ksm.http-bind-host";
- public static final String OZONE_KSM_HTTPS_BIND_HOST_KEY =
- "ozone.ksm.https-bind-host";
- public static final String OZONE_KSM_HTTP_ADDRESS_KEY =
- "ozone.ksm.http-address";
- public static final String OZONE_KSM_HTTPS_ADDRESS_KEY =
- "ozone.ksm.https-address";
- public static final String OZONE_KSM_KEYTAB_FILE =
- "ozone.ksm.keytab.file";
- public static final String OZONE_KSM_HTTP_BIND_HOST_DEFAULT = "0.0.0.0";
- public static final int OZONE_KSM_HTTP_BIND_PORT_DEFAULT = 9874;
- public static final int OZONE_KSM_HTTPS_BIND_PORT_DEFAULT = 9875;
-
- // LevelDB cache file uses an off-heap cache in LevelDB of 128 MB.
- public static final String OZONE_KSM_DB_CACHE_SIZE_MB =
- "ozone.ksm.db.cache.size.mb";
- public static final int OZONE_KSM_DB_CACHE_SIZE_DEFAULT = 128;
-
- public static final String OZONE_KSM_USER_MAX_VOLUME =
- "ozone.ksm.user.max.volume";
- public static final int OZONE_KSM_USER_MAX_VOLUME_DEFAULT = 1024;
-
- // KSM Default user/group permissions
- public static final String OZONE_KSM_USER_RIGHTS =
- "ozone.ksm.user.rights";
- public static final OzoneAcl.OzoneACLRights OZONE_KSM_USER_RIGHTS_DEFAULT =
- OzoneAcl.OzoneACLRights.READ_WRITE;
-
- public static final String OZONE_KSM_GROUP_RIGHTS =
- "ozone.ksm.group.rights";
- public static final OzoneAcl.OzoneACLRights OZONE_KSM_GROUP_RIGHTS_DEFAULT =
- OzoneAcl.OzoneACLRights.READ_WRITE;
-
- public static final String OZONE_KEY_DELETING_LIMIT_PER_TASK =
- "ozone.key.deleting.limit.per.task";
- public static final int OZONE_KEY_DELETING_LIMIT_PER_TASK_DEFAULT = 1000;
-}
diff --git a/hadoop-ozone/common/src/main/java/org/apache/hadoop/ozone/om/OMConfigKeys.java b/hadoop-ozone/common/src/main/java/org/apache/hadoop/ozone/om/OMConfigKeys.java
new file mode 100644
index 0000000000..b9ca296631
--- /dev/null
+++ b/hadoop-ozone/common/src/main/java/org/apache/hadoop/ozone/om/OMConfigKeys.java
@@ -0,0 +1,81 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with this
+ * work for additional information regarding copyright ownership. The ASF
+ * licenses this file to you 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
+ *
+ * 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 org.apache.hadoop.ozone.om;
+
+import org.apache.hadoop.ozone.OzoneAcl;
+/**
+ * Ozone Manager Constants.
+ */
+public final class OMConfigKeys {
+ /**
+ * Never constructed.
+ */
+ private OMConfigKeys() {
+ }
+
+
+ public static final String OZONE_OM_HANDLER_COUNT_KEY =
+ "ozone.om.handler.count.key";
+ public static final int OZONE_OM_HANDLER_COUNT_DEFAULT = 20;
+
+ public static final String OZONE_OM_ADDRESS_KEY =
+ "ozone.om.address";
+ public static final String OZONE_OM_BIND_HOST_DEFAULT =
+ "0.0.0.0";
+ public static final int OZONE_OM_PORT_DEFAULT = 9862;
+
+ public static final String OZONE_OM_HTTP_ENABLED_KEY =
+ "ozone.om.http.enabled";
+ public static final String OZONE_OM_HTTP_BIND_HOST_KEY =
+ "ozone.om.http-bind-host";
+ public static final String OZONE_OM_HTTPS_BIND_HOST_KEY =
+ "ozone.om.https-bind-host";
+ public static final String OZONE_OM_HTTP_ADDRESS_KEY =
+ "ozone.om.http-address";
+ public static final String OZONE_OM_HTTPS_ADDRESS_KEY =
+ "ozone.om.https-address";
+ public static final String OZONE_OM_KEYTAB_FILE =
+ "ozone.om.keytab.file";
+ public static final String OZONE_OM_HTTP_BIND_HOST_DEFAULT = "0.0.0.0";
+ public static final int OZONE_OM_HTTP_BIND_PORT_DEFAULT = 9874;
+ public static final int OZONE_OM_HTTPS_BIND_PORT_DEFAULT = 9875;
+
+ // LevelDB cache file uses an off-heap cache in LevelDB of 128 MB.
+ public static final String OZONE_OM_DB_CACHE_SIZE_MB =
+ "ozone.om.db.cache.size.mb";
+ public static final int OZONE_OM_DB_CACHE_SIZE_DEFAULT = 128;
+
+ public static final String OZONE_OM_USER_MAX_VOLUME =
+ "ozone.om.user.max.volume";
+ public static final int OZONE_OM_USER_MAX_VOLUME_DEFAULT = 1024;
+
+ // OM Default user/group permissions
+ public static final String OZONE_OM_USER_RIGHTS =
+ "ozone.om.user.rights";
+ public static final OzoneAcl.OzoneACLRights OZONE_OM_USER_RIGHTS_DEFAULT =
+ OzoneAcl.OzoneACLRights.READ_WRITE;
+
+ public static final String OZONE_OM_GROUP_RIGHTS =
+ "ozone.om.group.rights";
+ public static final OzoneAcl.OzoneACLRights OZONE_OM_GROUP_RIGHTS_DEFAULT =
+ OzoneAcl.OzoneACLRights.READ_WRITE;
+
+ public static final String OZONE_KEY_DELETING_LIMIT_PER_TASK =
+ "ozone.key.deleting.limit.per.task";
+ public static final int OZONE_KEY_DELETING_LIMIT_PER_TASK_DEFAULT = 1000;
+}
diff --git a/hadoop-ozone/common/src/main/java/org/apache/hadoop/ozone/ksm/helpers/KsmBucketArgs.java b/hadoop-ozone/common/src/main/java/org/apache/hadoop/ozone/om/helpers/OmBucketArgs.java
similarity index 81%
rename from hadoop-ozone/common/src/main/java/org/apache/hadoop/ozone/ksm/helpers/KsmBucketArgs.java
rename to hadoop-ozone/common/src/main/java/org/apache/hadoop/ozone/om/helpers/OmBucketArgs.java
index 1211b50c5c..6aabfef6b4 100644
--- a/hadoop-ozone/common/src/main/java/org/apache/hadoop/ozone/ksm/helpers/KsmBucketArgs.java
+++ b/hadoop-ozone/common/src/main/java/org/apache/hadoop/ozone/om/helpers/OmBucketArgs.java
@@ -15,7 +15,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package org.apache.hadoop.ozone.ksm.helpers;
+package org.apache.hadoop.ozone.om.helpers;
import java.util.List;
import java.util.stream.Collectors;
@@ -25,13 +25,13 @@
import org.apache.hadoop.hdfs.protocolPB.PBHelperClient;
import org.apache.hadoop.ozone.OzoneAcl;
import org.apache.hadoop.ozone.protocol.proto
- .KeySpaceManagerProtocolProtos.BucketArgs;
-import org.apache.hadoop.ozone.protocolPB.KSMPBHelper;
+ .OzoneManagerProtocolProtos.BucketArgs;
+import org.apache.hadoop.ozone.protocolPB.OMPBHelper;
/**
* A class that encapsulates Bucket Arguments.
*/
-public final class KsmBucketArgs {
+public final class OmBucketArgs {
/**
* Name of the volume in which the bucket belongs to.
*/
@@ -67,9 +67,9 @@ public final class KsmBucketArgs {
* @param isVersionEnabled - Bucket version flag.
* @param storageType - Storage type to be used.
*/
- private KsmBucketArgs(String volumeName, String bucketName,
- List addAcls, List removeAcls,
- Boolean isVersionEnabled, StorageType storageType) {
+ private OmBucketArgs(String volumeName, String bucketName,
+ List addAcls, List removeAcls,
+ Boolean isVersionEnabled, StorageType storageType) {
this.volumeName = volumeName;
this.bucketName = bucketName;
this.addAcls = addAcls;
@@ -127,7 +127,7 @@ public StorageType getStorageType() {
}
/**
- * Returns new builder class that builds a KsmBucketArgs.
+ * Returns new builder class that builds a OmBucketArgs.
*
* @return Builder
*/
@@ -136,7 +136,7 @@ public static Builder newBuilder() {
}
/**
- * Builder for KsmBucketArgs.
+ * Builder for OmBucketArgs.
*/
public static class Builder {
private String volumeName;
@@ -177,19 +177,19 @@ public Builder setStorageType(StorageType storage) {
}
/**
- * Constructs the KsmBucketArgs.
- * @return instance of KsmBucketArgs.
+ * Constructs the OmBucketArgs.
+ * @return instance of OmBucketArgs.
*/
- public KsmBucketArgs build() {
+ public OmBucketArgs build() {
Preconditions.checkNotNull(volumeName);
Preconditions.checkNotNull(bucketName);
- return new KsmBucketArgs(volumeName, bucketName, addAcls,
+ return new OmBucketArgs(volumeName, bucketName, addAcls,
removeAcls, isVersionEnabled, storageType);
}
}
/**
- * Creates BucketArgs protobuf from KsmBucketArgs.
+ * Creates BucketArgs protobuf from OmBucketArgs.
*/
public BucketArgs getProtobuf() {
BucketArgs.Builder builder = BucketArgs.newBuilder();
@@ -197,11 +197,11 @@ public BucketArgs getProtobuf() {
.setBucketName(bucketName);
if(addAcls != null && !addAcls.isEmpty()) {
builder.addAllAddAcls(addAcls.stream().map(
- KSMPBHelper::convertOzoneAcl).collect(Collectors.toList()));
+ OMPBHelper::convertOzoneAcl).collect(Collectors.toList()));
}
if(removeAcls != null && !removeAcls.isEmpty()) {
builder.addAllRemoveAcls(removeAcls.stream().map(
- KSMPBHelper::convertOzoneAcl).collect(Collectors.toList()));
+ OMPBHelper::convertOzoneAcl).collect(Collectors.toList()));
}
if(isVersionEnabled != null) {
builder.setIsVersionEnabled(isVersionEnabled);
@@ -214,20 +214,20 @@ public BucketArgs getProtobuf() {
}
/**
- * Parses BucketInfo protobuf and creates KsmBucketArgs.
+ * Parses BucketInfo protobuf and creates OmBucketArgs.
* @param bucketArgs
- * @return instance of KsmBucketArgs
+ * @return instance of OmBucketArgs
*/
- public static KsmBucketArgs getFromProtobuf(BucketArgs bucketArgs) {
- return new KsmBucketArgs(bucketArgs.getVolumeName(),
+ public static OmBucketArgs getFromProtobuf(BucketArgs bucketArgs) {
+ return new OmBucketArgs(bucketArgs.getVolumeName(),
bucketArgs.getBucketName(),
bucketArgs.getAddAclsList().stream().map(
- KSMPBHelper::convertOzoneAcl).collect(Collectors.toList()),
+ OMPBHelper::convertOzoneAcl).collect(Collectors.toList()),
bucketArgs.getRemoveAclsList().stream().map(
- KSMPBHelper::convertOzoneAcl).collect(Collectors.toList()),
+ OMPBHelper::convertOzoneAcl).collect(Collectors.toList()),
bucketArgs.hasIsVersionEnabled() ?
bucketArgs.getIsVersionEnabled() : null,
bucketArgs.hasStorageType() ? PBHelperClient.convertStorageType(
bucketArgs.getStorageType()) : null);
}
-}
\ No newline at end of file
+}
diff --git a/hadoop-ozone/common/src/main/java/org/apache/hadoop/ozone/ksm/helpers/KsmBucketInfo.java b/hadoop-ozone/common/src/main/java/org/apache/hadoop/ozone/om/helpers/OmBucketInfo.java
similarity index 83%
rename from hadoop-ozone/common/src/main/java/org/apache/hadoop/ozone/ksm/helpers/KsmBucketInfo.java
rename to hadoop-ozone/common/src/main/java/org/apache/hadoop/ozone/om/helpers/OmBucketInfo.java
index a49137a7cf..bf5abddc43 100644
--- a/hadoop-ozone/common/src/main/java/org/apache/hadoop/ozone/ksm/helpers/KsmBucketInfo.java
+++ b/hadoop-ozone/common/src/main/java/org/apache/hadoop/ozone/om/helpers/OmBucketInfo.java
@@ -15,15 +15,15 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package org.apache.hadoop.ozone.ksm.helpers;
+package org.apache.hadoop.ozone.om.helpers;
import com.google.common.base.Preconditions;
import org.apache.hadoop.fs.StorageType;
import org.apache.hadoop.hdfs.protocolPB.PBHelperClient;
import org.apache.hadoop.ozone.OzoneAcl;
import org.apache.hadoop.ozone.protocol.proto
- .KeySpaceManagerProtocolProtos.BucketInfo;
-import org.apache.hadoop.ozone.protocolPB.KSMPBHelper;
+ .OzoneManagerProtocolProtos.BucketInfo;
+import org.apache.hadoop.ozone.protocolPB.OMPBHelper;
import java.util.LinkedList;
import java.util.List;
@@ -32,7 +32,7 @@
/**
* A class that encapsulates Bucket Info.
*/
-public final class KsmBucketInfo {
+public final class OmBucketInfo {
/**
* Name of the volume in which the bucket belongs to.
*/
@@ -68,9 +68,9 @@ public final class KsmBucketInfo {
* @param storageType - Storage type to be used.
* @param creationTime - Bucket creation time.
*/
- private KsmBucketInfo(String volumeName, String bucketName,
- List acls, boolean isVersionEnabled,
- StorageType storageType, long creationTime) {
+ private OmBucketInfo(String volumeName, String bucketName,
+ List acls, boolean isVersionEnabled,
+ StorageType storageType, long creationTime) {
this.volumeName = volumeName;
this.bucketName = bucketName;
this.acls = acls;
@@ -129,7 +129,7 @@ public long getCreationTime() {
}
/**
- * Returns new builder class that builds a KsmBucketInfo.
+ * Returns new builder class that builds a OmBucketInfo.
*
* @return Builder
*/
@@ -138,7 +138,7 @@ public static Builder newBuilder() {
}
/**
- * Builder for KsmBucketInfo.
+ * Builder for OmBucketInfo.
*/
public static class Builder {
private String volumeName;
@@ -186,30 +186,30 @@ public Builder setCreationTime(long createdOn) {
}
/**
- * Constructs the KsmBucketInfo.
- * @return instance of KsmBucketInfo.
+ * Constructs the OmBucketInfo.
+ * @return instance of OmBucketInfo.
*/
- public KsmBucketInfo build() {
+ public OmBucketInfo build() {
Preconditions.checkNotNull(volumeName);
Preconditions.checkNotNull(bucketName);
Preconditions.checkNotNull(acls);
Preconditions.checkNotNull(isVersionEnabled);
Preconditions.checkNotNull(storageType);
- return new KsmBucketInfo(volumeName, bucketName, acls,
+ return new OmBucketInfo(volumeName, bucketName, acls,
isVersionEnabled, storageType, creationTime);
}
}
/**
- * Creates BucketInfo protobuf from KsmBucketInfo.
+ * Creates BucketInfo protobuf from OmBucketInfo.
*/
public BucketInfo getProtobuf() {
return BucketInfo.newBuilder()
.setVolumeName(volumeName)
.setBucketName(bucketName)
.addAllAcls(acls.stream().map(
- KSMPBHelper::convertOzoneAcl).collect(Collectors.toList()))
+ OMPBHelper::convertOzoneAcl).collect(Collectors.toList()))
.setIsVersionEnabled(isVersionEnabled)
.setStorageType(PBHelperClient.convertStorageType(
storageType))
@@ -218,18 +218,18 @@ public BucketInfo getProtobuf() {
}
/**
- * Parses BucketInfo protobuf and creates KsmBucketInfo.
+ * Parses BucketInfo protobuf and creates OmBucketInfo.
* @param bucketInfo
- * @return instance of KsmBucketInfo
+ * @return instance of OmBucketInfo
*/
- public static KsmBucketInfo getFromProtobuf(BucketInfo bucketInfo) {
- return new KsmBucketInfo(
+ public static OmBucketInfo getFromProtobuf(BucketInfo bucketInfo) {
+ return new OmBucketInfo(
bucketInfo.getVolumeName(),
bucketInfo.getBucketName(),
bucketInfo.getAclsList().stream().map(
- KSMPBHelper::convertOzoneAcl).collect(Collectors.toList()),
+ OMPBHelper::convertOzoneAcl).collect(Collectors.toList()),
bucketInfo.getIsVersionEnabled(),
PBHelperClient.convertStorageType(
bucketInfo.getStorageType()), bucketInfo.getCreationTime());
}
-}
\ No newline at end of file
+}
diff --git a/hadoop-ozone/common/src/main/java/org/apache/hadoop/ozone/ksm/helpers/KsmKeyArgs.java b/hadoop-ozone/common/src/main/java/org/apache/hadoop/ozone/om/helpers/OmKeyArgs.java
similarity index 88%
rename from hadoop-ozone/common/src/main/java/org/apache/hadoop/ozone/ksm/helpers/KsmKeyArgs.java
rename to hadoop-ozone/common/src/main/java/org/apache/hadoop/ozone/om/helpers/OmKeyArgs.java
index cd17e28b9a..1f8ed5fb1e 100644
--- a/hadoop-ozone/common/src/main/java/org/apache/hadoop/ozone/ksm/helpers/KsmKeyArgs.java
+++ b/hadoop-ozone/common/src/main/java/org/apache/hadoop/ozone/om/helpers/OmKeyArgs.java
@@ -15,7 +15,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package org.apache.hadoop.ozone.ksm.helpers;
+package org.apache.hadoop.ozone.om.helpers;
import org.apache.hadoop.hdds.protocol.proto.HddsProtos.ReplicationType;
import org.apache.hadoop.hdds.protocol.proto.HddsProtos.ReplicationFactor;
@@ -23,7 +23,7 @@
* Args for key. Client use this to specify key's attributes on key creation
* (putKey()).
*/
-public final class KsmKeyArgs {
+public final class OmKeyArgs {
private final String volumeName;
private final String bucketName;
private final String keyName;
@@ -31,8 +31,8 @@ public final class KsmKeyArgs {
private final ReplicationType type;
private final ReplicationFactor factor;
- private KsmKeyArgs(String volumeName, String bucketName, String keyName,
- long dataSize, ReplicationType type, ReplicationFactor factor) {
+ private OmKeyArgs(String volumeName, String bucketName, String keyName,
+ long dataSize, ReplicationType type, ReplicationFactor factor) {
this.volumeName = volumeName;
this.bucketName = bucketName;
this.keyName = keyName;
@@ -70,7 +70,7 @@ public void setDataSize(long size) {
}
/**
- * Builder class of KsmKeyArgs.
+ * Builder class of OmKeyArgs.
*/
public static class Builder {
private String volumeName;
@@ -111,8 +111,8 @@ public Builder setFactor(ReplicationFactor replicationFactor) {
return this;
}
- public KsmKeyArgs build() {
- return new KsmKeyArgs(volumeName, bucketName, keyName, dataSize,
+ public OmKeyArgs build() {
+ return new OmKeyArgs(volumeName, bucketName, keyName, dataSize,
type, factor);
}
}
diff --git a/hadoop-ozone/common/src/main/java/org/apache/hadoop/ozone/ksm/helpers/KsmKeyInfo.java b/hadoop-ozone/common/src/main/java/org/apache/hadoop/ozone/om/helpers/OmKeyInfo.java
similarity index 79%
rename from hadoop-ozone/common/src/main/java/org/apache/hadoop/ozone/ksm/helpers/KsmKeyInfo.java
rename to hadoop-ozone/common/src/main/java/org/apache/hadoop/ozone/om/helpers/OmKeyInfo.java
index 5d6e63367a..05c8d45fbf 100644
--- a/hadoop-ozone/common/src/main/java/org/apache/hadoop/ozone/ksm/helpers/KsmKeyInfo.java
+++ b/hadoop-ozone/common/src/main/java/org/apache/hadoop/ozone/om/helpers/OmKeyInfo.java
@@ -15,11 +15,11 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package org.apache.hadoop.ozone.ksm.helpers;
+package org.apache.hadoop.ozone.om.helpers;
import com.google.common.base.Preconditions;
import org.apache.hadoop.hdds.protocol.proto.HddsProtos;
-import org.apache.hadoop.ozone.protocol.proto.KeySpaceManagerProtocolProtos.KeyInfo;
+import org.apache.hadoop.ozone.protocol.proto.OzoneManagerProtocolProtos.KeyInfo;
import org.apache.hadoop.util.Time;
import java.io.IOException;
@@ -28,36 +28,36 @@
/**
* Args for key block. The block instance for the key requested in putKey.
- * This is returned from KSM to client, and client use class to talk to
- * datanode. Also, this is the metadata written to ksm.db on server side.
+ * This is returned from OM to client, and client use class to talk to
+ * datanode. Also, this is the metadata written to om.db on server side.
*/
-public final class KsmKeyInfo {
+public final class OmKeyInfo {
private final String volumeName;
private final String bucketName;
// name of key client specified
private String keyName;
private long dataSize;
- private List keyLocationVersions;
+ private List keyLocationVersions;
private final long creationTime;
private long modificationTime;
private HddsProtos.ReplicationType type;
private HddsProtos.ReplicationFactor factor;
- private KsmKeyInfo(String volumeName, String bucketName, String keyName,
- List versions, long dataSize,
- long creationTime, long modificationTime, HddsProtos.ReplicationType type,
- HddsProtos.ReplicationFactor factor) {
+ private OmKeyInfo(String volumeName, String bucketName, String keyName,
+ List versions, long dataSize,
+ long creationTime, long modificationTime, HddsProtos.ReplicationType type,
+ HddsProtos.ReplicationFactor factor) {
this.volumeName = volumeName;
this.bucketName = bucketName;
this.keyName = keyName;
this.dataSize = dataSize;
// it is important that the versions are ordered from old to new.
- // Do this sanity check when versions got loaded on creating KsmKeyInfo.
+ // Do this sanity check when versions got loaded on creating OmKeyInfo.
// TODO : this is not necessary, here only because versioning is still a
// work in-progress, remove this following check when versioning is
// complete and prove correctly functioning
long currentVersion = -1;
- for (KsmKeyLocationInfoGroup version : versions) {
+ for (OmKeyLocationInfoGroup version : versions) {
Preconditions.checkArgument(
currentVersion + 1 == version.getVersion());
currentVersion = version.getVersion();
@@ -101,13 +101,13 @@ public void setDataSize(long size) {
this.dataSize = size;
}
- public synchronized KsmKeyLocationInfoGroup getLatestVersionLocations()
+ public synchronized OmKeyLocationInfoGroup getLatestVersionLocations()
throws IOException {
return keyLocationVersions.size() == 0? null :
keyLocationVersions.get(keyLocationVersions.size() - 1);
}
- public List getKeyLocationVersions() {
+ public List getKeyLocationVersions() {
return keyLocationVersions;
}
@@ -123,11 +123,11 @@ public void updateModifcationTime() {
* @throws IOException
*/
public synchronized void appendNewBlocks(
- List newLocationList) throws IOException {
+ List newLocationList) throws IOException {
if (keyLocationVersions.size() == 0) {
throw new IOException("Appending new block, but no version exist");
}
- KsmKeyLocationInfoGroup currentLatestVersion =
+ OmKeyLocationInfoGroup currentLatestVersion =
keyLocationVersions.get(keyLocationVersions.size() - 1);
currentLatestVersion.appendNewBlocks(newLocationList);
setModificationTime(Time.now());
@@ -141,18 +141,18 @@ public synchronized void appendNewBlocks(
* @throws IOException
*/
public synchronized long addNewVersion(
- List newLocationList) throws IOException {
+ List newLocationList) throws IOException {
long latestVersionNum;
if (keyLocationVersions.size() == 0) {
// no version exist, these blocks are the very first version.
- keyLocationVersions.add(new KsmKeyLocationInfoGroup(0, newLocationList));
+ keyLocationVersions.add(new OmKeyLocationInfoGroup(0, newLocationList));
latestVersionNum = 0;
} else {
// it is important that the new version are always at the tail of the list
- KsmKeyLocationInfoGroup currentLatestVersion =
+ OmKeyLocationInfoGroup currentLatestVersion =
keyLocationVersions.get(keyLocationVersions.size() - 1);
// the new version is created based on the current latest version
- KsmKeyLocationInfoGroup newVersion =
+ OmKeyLocationInfoGroup newVersion =
currentLatestVersion.generateNextVersion(newLocationList);
keyLocationVersions.add(newVersion);
latestVersionNum = newVersion.getVersion();
@@ -174,14 +174,14 @@ public void setModificationTime(long modificationTime) {
}
/**
- * Builder of KsmKeyInfo.
+ * Builder of OmKeyInfo.
*/
public static class Builder {
private String volumeName;
private String bucketName;
private String keyName;
private long dataSize;
- private List ksmKeyLocationInfoGroups;
+ private List omKeyLocationInfoGroups;
private long creationTime;
private long modificationTime;
private HddsProtos.ReplicationType type;
@@ -202,9 +202,9 @@ public Builder setKeyName(String key) {
return this;
}
- public Builder setKsmKeyLocationInfos(
- List ksmKeyLocationInfoList) {
- this.ksmKeyLocationInfoGroups = ksmKeyLocationInfoList;
+ public Builder setOmKeyLocationInfos(
+ List omKeyLocationInfoList) {
+ this.omKeyLocationInfoGroups = omKeyLocationInfoList;
return this;
}
@@ -233,9 +233,9 @@ public Builder setReplicationType(HddsProtos.ReplicationType type) {
return this;
}
- public KsmKeyInfo build() {
- return new KsmKeyInfo(
- volumeName, bucketName, keyName, ksmKeyLocationInfoGroups,
+ public OmKeyInfo build() {
+ return new OmKeyInfo(
+ volumeName, bucketName, keyName, omKeyLocationInfoGroups,
dataSize, creationTime, modificationTime, type, factor);
}
}
@@ -251,7 +251,7 @@ public KeyInfo getProtobuf() {
.setFactor(factor)
.setType(type)
.addAllKeyLocationList(keyLocationVersions.stream()
- .map(KsmKeyLocationInfoGroup::getProtobuf)
+ .map(OmKeyLocationInfoGroup::getProtobuf)
.collect(Collectors.toList()))
.setLatestVersion(latestVersion)
.setCreationTime(creationTime)
@@ -259,13 +259,13 @@ public KeyInfo getProtobuf() {
.build();
}
- public static KsmKeyInfo getFromProtobuf(KeyInfo keyInfo) {
- return new KsmKeyInfo(
+ public static OmKeyInfo getFromProtobuf(KeyInfo keyInfo) {
+ return new OmKeyInfo(
keyInfo.getVolumeName(),
keyInfo.getBucketName(),
keyInfo.getKeyName(),
keyInfo.getKeyLocationListList().stream()
- .map(KsmKeyLocationInfoGroup::getFromProtobuf)
+ .map(OmKeyLocationInfoGroup::getFromProtobuf)
.collect(Collectors.toList()),
keyInfo.getDataSize(),
keyInfo.getCreationTime(),
diff --git a/hadoop-ozone/common/src/main/java/org/apache/hadoop/ozone/ksm/helpers/KsmKeyLocationInfo.java b/hadoop-ozone/common/src/main/java/org/apache/hadoop/ozone/om/helpers/OmKeyLocationInfo.java
similarity index 85%
rename from hadoop-ozone/common/src/main/java/org/apache/hadoop/ozone/ksm/helpers/KsmKeyLocationInfo.java
rename to hadoop-ozone/common/src/main/java/org/apache/hadoop/ozone/om/helpers/OmKeyLocationInfo.java
index 45feda0b7c..3f6666df81 100644
--- a/hadoop-ozone/common/src/main/java/org/apache/hadoop/ozone/ksm/helpers/KsmKeyLocationInfo.java
+++ b/hadoop-ozone/common/src/main/java/org/apache/hadoop/ozone/om/helpers/OmKeyLocationInfo.java
@@ -14,16 +14,16 @@
* License for the specific language governing permissions and limitations under
* the License.
*/
-package org.apache.hadoop.ozone.ksm.helpers;
+package org.apache.hadoop.ozone.om.helpers;
import org.apache.hadoop.hdds.client.BlockID;
-import org.apache.hadoop.ozone.protocol.proto.KeySpaceManagerProtocolProtos.KeyLocation;
+import org.apache.hadoop.ozone.protocol.proto.OzoneManagerProtocolProtos.KeyLocation;
/**
* One key can be too huge to fit in one container. In which case it gets split
* into a number of subkeys. This class represents one such subkey instance.
*/
-public final class KsmKeyLocationInfo {
+public final class OmKeyLocationInfo {
private final BlockID blockID;
private final boolean shouldCreateContainer;
// the id of this subkey in all the subkeys.
@@ -32,8 +32,8 @@ public final class KsmKeyLocationInfo {
// the version number indicating when this block was added
private long createVersion;
- private KsmKeyLocationInfo(BlockID blockID, boolean shouldCreateContainer,
- long length, long offset) {
+ private OmKeyLocationInfo(BlockID blockID, boolean shouldCreateContainer,
+ long length, long offset) {
this.blockID = blockID;
this.shouldCreateContainer = shouldCreateContainer;
this.length = length;
@@ -73,7 +73,7 @@ public long getOffset() {
}
/**
- * Builder of KsmKeyLocationInfo.
+ * Builder of OmKeyLocationInfo.
*/
public static class Builder {
private BlockID blockID;
@@ -101,8 +101,8 @@ public Builder setOffset(long off) {
return this;
}
- public KsmKeyLocationInfo build() {
- return new KsmKeyLocationInfo(blockID,
+ public OmKeyLocationInfo build() {
+ return new OmKeyLocationInfo(blockID,
shouldCreateContainer, length, offset);
}
}
@@ -117,8 +117,8 @@ public KeyLocation getProtobuf() {
.build();
}
- public static KsmKeyLocationInfo getFromProtobuf(KeyLocation keyLocation) {
- KsmKeyLocationInfo info = new KsmKeyLocationInfo(
+ public static OmKeyLocationInfo getFromProtobuf(KeyLocation keyLocation) {
+ OmKeyLocationInfo info = new OmKeyLocationInfo(
BlockID.getFromProtobuf(keyLocation.getBlockID()),
keyLocation.getShouldCreateContainer(),
keyLocation.getLength(),
diff --git a/hadoop-ozone/common/src/main/java/org/apache/hadoop/ozone/ksm/helpers/KsmKeyLocationInfoGroup.java b/hadoop-ozone/common/src/main/java/org/apache/hadoop/ozone/om/helpers/OmKeyLocationInfoGroup.java
similarity index 70%
rename from hadoop-ozone/common/src/main/java/org/apache/hadoop/ozone/ksm/helpers/KsmKeyLocationInfoGroup.java
rename to hadoop-ozone/common/src/main/java/org/apache/hadoop/ozone/om/helpers/OmKeyLocationInfoGroup.java
index 0facf3ca41..8bdcee3803 100644
--- a/hadoop-ozone/common/src/main/java/org/apache/hadoop/ozone/ksm/helpers/KsmKeyLocationInfoGroup.java
+++ b/hadoop-ozone/common/src/main/java/org/apache/hadoop/ozone/om/helpers/OmKeyLocationInfoGroup.java
@@ -14,9 +14,9 @@
* License for the specific language governing permissions and limitations under
* the License.
*/
-package org.apache.hadoop.ozone.ksm.helpers;
+package org.apache.hadoop.ozone.om.helpers;
-import org.apache.hadoop.ozone.protocol.proto.KeySpaceManagerProtocolProtos.KeyLocationList;
+import org.apache.hadoop.ozone.protocol.proto.OzoneManagerProtocolProtos.KeyLocationList;
import java.io.IOException;
import java.util.ArrayList;
@@ -27,12 +27,12 @@
* A list of key locations. This class represents one single version of the
* blocks of a key.
*/
-public class KsmKeyLocationInfoGroup {
+public class OmKeyLocationInfoGroup {
private final long version;
- private final List locationList;
+ private final List locationList;
- public KsmKeyLocationInfoGroup(long version,
- List locations) {
+ public OmKeyLocationInfoGroup(long version,
+ List locations) {
this.version = version;
this.locationList = locations;
}
@@ -42,8 +42,8 @@ public KsmKeyLocationInfoGroup(long version,
*
* @return the list of blocks that are created in the latest version.
*/
- public List getBlocksLatestVersionOnly() {
- List list = new ArrayList<>();
+ public List getBlocksLatestVersionOnly() {
+ List list = new ArrayList<>();
locationList.stream().filter(x -> x.getCreateVersion() == version)
.forEach(list::add);
return list;
@@ -53,7 +53,7 @@ public long getVersion() {
return version;
}
- public List getLocationList() {
+ public List getLocationList() {
return locationList;
}
@@ -61,17 +61,17 @@ public KeyLocationList getProtobuf() {
return KeyLocationList.newBuilder()
.setVersion(version)
.addAllKeyLocations(
- locationList.stream().map(KsmKeyLocationInfo::getProtobuf)
+ locationList.stream().map(OmKeyLocationInfo::getProtobuf)
.collect(Collectors.toList()))
.build();
}
- public static KsmKeyLocationInfoGroup getFromProtobuf(
+ public static OmKeyLocationInfoGroup getFromProtobuf(
KeyLocationList keyLocationList) {
- return new KsmKeyLocationInfoGroup(
+ return new OmKeyLocationInfoGroup(
keyLocationList.getVersion(),
keyLocationList.getKeyLocationsList().stream()
- .map(KsmKeyLocationInfo::getFromProtobuf)
+ .map(OmKeyLocationInfo::getFromProtobuf)
.collect(Collectors.toList()));
}
@@ -82,25 +82,25 @@ public static KsmKeyLocationInfoGroup getFromProtobuf(
* @param newLocationList a list of new location to be added.
* @return
*/
- KsmKeyLocationInfoGroup generateNextVersion(
- List newLocationList) throws IOException {
+ OmKeyLocationInfoGroup generateNextVersion(
+ List newLocationList) throws IOException {
// TODO : revisit if we can do this method more efficiently
// one potential inefficiency here is that later version always include
// older ones. e.g. v1 has B1, then v2, v3...will all have B1 and only add
// more
- List newList = new ArrayList<>();
+ List newList = new ArrayList<>();
newList.addAll(locationList);
- for (KsmKeyLocationInfo newInfo : newLocationList) {
+ for (OmKeyLocationInfo newInfo : newLocationList) {
// all these new blocks will have addVersion of current version + 1
newInfo.setCreateVersion(version + 1);
newList.add(newInfo);
}
- return new KsmKeyLocationInfoGroup(version + 1, newList);
+ return new OmKeyLocationInfoGroup(version + 1, newList);
}
- void appendNewBlocks(List newLocationList)
+ void appendNewBlocks(List newLocationList)
throws IOException {
- for (KsmKeyLocationInfo info : newLocationList) {
+ for (OmKeyLocationInfo info : newLocationList) {
info.setCreateVersion(version);
locationList.add(info);
}
@@ -110,7 +110,7 @@ void appendNewBlocks(List newLocationList)
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("version:").append(version).append(" ");
- for (KsmKeyLocationInfo kli : locationList) {
+ for (OmKeyLocationInfo kli : locationList) {
sb.append(kli.getLocalID()).append(" || ");
}
return sb.toString();
diff --git a/hadoop-ozone/common/src/main/java/org/apache/hadoop/ozone/ksm/helpers/KsmOzoneAclMap.java b/hadoop-ozone/common/src/main/java/org/apache/hadoop/ozone/om/helpers/OmOzoneAclMap.java
similarity index 89%
rename from hadoop-ozone/common/src/main/java/org/apache/hadoop/ozone/ksm/helpers/KsmOzoneAclMap.java
rename to hadoop-ozone/common/src/main/java/org/apache/hadoop/ozone/om/helpers/OmOzoneAclMap.java
index 7d9efad15a..de75a05e9d 100644
--- a/hadoop-ozone/common/src/main/java/org/apache/hadoop/ozone/ksm/helpers/KsmOzoneAclMap.java
+++ b/hadoop-ozone/common/src/main/java/org/apache/hadoop/ozone/om/helpers/OmOzoneAclMap.java
@@ -16,14 +16,14 @@
* limitations under the License.
*/
-package org.apache.hadoop.ozone.ksm.helpers;
+package org.apache.hadoop.ozone.om.helpers;
import org.apache.hadoop.ozone.protocol.proto
- .KeySpaceManagerProtocolProtos.OzoneAclInfo;
+ .OzoneManagerProtocolProtos.OzoneAclInfo;
import org.apache.hadoop.ozone.protocol.proto
- .KeySpaceManagerProtocolProtos.OzoneAclInfo.OzoneAclRights;
+ .OzoneManagerProtocolProtos.OzoneAclInfo.OzoneAclRights;
import org.apache.hadoop.ozone.protocol.proto
- .KeySpaceManagerProtocolProtos.OzoneAclInfo.OzoneAclType;
+ .OzoneManagerProtocolProtos.OzoneAclInfo.OzoneAclType;
import java.util.List;
import java.util.LinkedList;
@@ -34,11 +34,11 @@
/**
* This helper class keeps a map of all user and their permissions.
*/
-public class KsmOzoneAclMap {
+public class OmOzoneAclMap {
// per Acl Type user:rights map
private ArrayList