1/********************************************************************
2 * Copyright (c) 2013 - 2014, Pivotal Inc.
3 * All rights reserved.
4 *
5 * Author: Zhanwei Wang
6 ********************************************************************/
7/********************************************************************
8 * 2014 -
9 * open source under Apache License Version 2.0
10 ********************************************************************/
11/**
12 * Licensed to the Apache Software Foundation (ASF) under one
13 * or more contributor license agreements. See the NOTICE file
14 * distributed with this work for additional information
15 * regarding copyright ownership. The ASF licenses this file
16 * to you under the Apache License, Version 2.0 (the
17 * "License"); you may not use this file except in compliance
18 * with the License. You may obtain a copy of the License at
19 *
20 * http://www.apache.org/licenses/LICENSE-2.0
21 *
22 * Unless required by applicable law or agreed to in writing, software
23 * distributed under the License is distributed on an "AS IS" BASIS,
24 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
25 * See the License for the specific language governing permissions and
26 * limitations under the License.
27 */
28#ifndef _HDFS_LIBHDFS3_SERVER_BLOCKLOCALPATHINFO_H_
29#define _HDFS_LIBHDFS3_SERVER_BLOCKLOCALPATHINFO_H_
30
31#include "ExtendedBlock.h"
32
33namespace Hdfs {
34namespace Internal {
35
36class BlockLocalPathInfo {
37public:
38 const ExtendedBlock & getBlock() const {
39 return block;
40 }
41
42 void setBlock(const ExtendedBlock & block) {
43 this->block = block;
44 }
45
46 const char * getLocalBlockPath() const {
47 return localBlockPath.c_str();
48 }
49
50 void setLocalBlockPath(const char * localBlockPath) {
51 this->localBlockPath = localBlockPath;
52 }
53
54 const char * getLocalMetaPath() const {
55 return localMetaPath.c_str();
56 }
57
58 void setLocalMetaPath(const char * localMetaPath) {
59 this->localMetaPath = localMetaPath;
60 }
61
62private:
63 ExtendedBlock block;
64 std::string localBlockPath;
65 std::string localMetaPath;
66};
67
68}
69}
70
71#endif /* _HDFS_LIBHDFS3_SERVER_BLOCKLOCALPATHINFO_H_ */
72