Skip to content

Commit d12faba

Browse files
committed
HDFS-2412. Add backwards-compatibility layer for renamed FSConstants class. Contributed by Todd Lipcon.
git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/trunk@1180202 13f79535-47bb-0310-9956-ffa450edef68
1 parent e2c4fd2 commit d12faba

File tree

3 files changed

+33
-3
lines changed

3 files changed

+33
-3
lines changed

hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1122,6 +1122,9 @@ Release 0.23.0 - Unreleased
11221122

11231123
HDFS-2323. start-dfs.sh script fails for tarball install (tomwhite)
11241124

1125+
HDFS-2412. Add backwards-compatibility layer for renamed FSConstants
1126+
class (todd)
1127+
11251128
BREAKDOWN OF HDFS-1073 SUBTASKS
11261129

11271130
HDFS-1521. Persist transaction ID on disk between NN restarts.
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
/**
2+
* Licensed to the Apache Software Foundation (ASF) under one
3+
* or more contributor license agreements. See the NOTICE file
4+
* distributed with this work for additional information
5+
* regarding copyright ownership. The ASF licenses this file
6+
* to you under the Apache License, Version 2.0 (the
7+
* "License"); you may not use this file except in compliance
8+
* with the License. You may obtain a copy of the License at
9+
*
10+
* http://www.apache.org/licenses/LICENSE-2.0
11+
*
12+
* Unless required by applicable law or agreed to in writing, software
13+
* distributed under the License is distributed on an "AS IS" BASIS,
14+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15+
* See the License for the specific language governing permissions and
16+
* limitations under the License.
17+
*/
18+
package org.apache.hadoop.hdfs.protocol;
19+
20+
/**
21+
* @deprecated Please use {@link HdfsConstants}. This class
22+
* is left only for other ecosystem projects which depended on
23+
* it for SafemodeAction and DatanodeReport types.
24+
*/
25+
@Deprecated
26+
public abstract class FSConstants extends HdfsConstants {
27+
}

hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/protocol/HdfsConstants.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,9 @@
2626
*
2727
************************************/
2828
@InterfaceAudience.Private
29-
public final class HdfsConstants {
29+
public class HdfsConstants {
3030
/* Hidden constructor */
31-
private HdfsConstants() {
31+
protected HdfsConstants() {
3232
}
3333

3434
/**
@@ -72,7 +72,7 @@ private HdfsConstants() {
7272
public static final int BYTES_IN_INTEGER = Integer.SIZE / Byte.SIZE;
7373

7474
// SafeMode actions
75-
public enum SafeModeAction {
75+
public static enum SafeModeAction {
7676
SAFEMODE_LEAVE, SAFEMODE_ENTER, SAFEMODE_GET;
7777
}
7878

0 commit comments

Comments
 (0)