HDFS-8753. Ozone: Unify StorageContainerConfiguration with ozone-default.xml & ozone-site.xml. Contributed by kanaka kumar avvaru
This commit is contained in:
parent
507e7274aa
commit
764ff0d505
|
@ -304,6 +304,7 @@ http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
|||
<configuration>
|
||||
<tasks>
|
||||
<copy file="src/main/resources/hdfs-default.xml" todir="src/site/resources"/>
|
||||
<copy file="src/main/resources/ozone-default.xml" todir="src/site/resources"/>
|
||||
<copy file="src/main/xsl/configuration.xsl" todir="src/site/resources"/>
|
||||
</tasks>
|
||||
</configuration>
|
||||
|
@ -415,6 +416,7 @@ http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
|||
<includes>
|
||||
<include>configuration.xsl</include>
|
||||
<include>hdfs-default.xml</include>
|
||||
<include>ozone-default.xml</include>
|
||||
</includes>
|
||||
<followSymlinks>false</followSymlinks>
|
||||
</fileset>
|
||||
|
|
|
@ -25,11 +25,12 @@ import org.apache.hadoop.conf.Configuration;
|
|||
* Configuration for ozone.
|
||||
*/
|
||||
@InterfaceAudience.Private
|
||||
public class StorageContainerConfiguration extends Configuration {
|
||||
public class OzoneConfiguration extends Configuration {
|
||||
static {
|
||||
// adds the default resources
|
||||
Configuration.addDefaultResource("hdfs-default.xml");
|
||||
Configuration.addDefaultResource("hdfs-site.xml");
|
||||
Configuration.addDefaultResource("ozone-default.xml");
|
||||
Configuration.addDefaultResource("ozone-site.xml");
|
||||
}
|
||||
}
|
|
@ -21,7 +21,7 @@ package org.apache.hadoop.ozone.web.localstorage;
|
|||
import org.apache.commons.logging.Log;
|
||||
import org.apache.commons.logging.LogFactory;
|
||||
import org.apache.hadoop.ozone.OzoneConfigKeys;
|
||||
import org.apache.hadoop.ozone.StorageContainerConfiguration;
|
||||
import org.apache.hadoop.ozone.OzoneConfiguration;
|
||||
import org.apache.hadoop.ozone.web.exceptions.ErrorTable;
|
||||
import org.apache.hadoop.ozone.web.exceptions.OzoneException;
|
||||
import org.apache.hadoop.ozone.web.handlers.UserArgs;
|
||||
|
@ -125,7 +125,7 @@ public final class OzoneMetadataManager {
|
|||
private OzoneMetadataManager() {
|
||||
|
||||
lock = new ReentrantReadWriteLock();
|
||||
StorageContainerConfiguration conf = new StorageContainerConfiguration();
|
||||
OzoneConfiguration conf = new OzoneConfiguration();
|
||||
|
||||
String storageRoot =
|
||||
conf.getTrimmed(OzoneConfigKeys.DFS_STORAGE_LOCAL_ROOT,
|
||||
|
|
|
@ -0,0 +1,27 @@
|
|||
<?xml version="1.0"?>
|
||||
<?xml-stylesheet type="text/xsl" href="configuration.xsl"?>
|
||||
|
||||
<!--
|
||||
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
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
-->
|
||||
|
||||
<!-- Do not modify this file directly. Instead, copy entries that you -->
|
||||
<!-- wish to modify from this file into ozone-site.xml and change them -->
|
||||
<!-- there. If ozone-site.xml does not already exist, create it. -->
|
||||
|
||||
<configuration>
|
||||
|
||||
</configuration>
|
|
@ -0,0 +1,24 @@
|
|||
<?xml version="1.0"?>
|
||||
<?xml-stylesheet type="text/xsl" href="configuration.xsl"?>
|
||||
<!--
|
||||
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
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
-->
|
||||
|
||||
<!-- Put site-specific property overrides in this file. -->
|
||||
|
||||
<configuration>
|
||||
|
||||
</configuration>
|
Loading…
Reference in New Issue