Package com.dianping.cat.configuration.server.entity

Examples of com.dianping.cat.configuration.server.entity.StorageConfig


    return null;
  }

  public long getHdfsFileMaxSize(String id) {
    if (m_config != null) {
      StorageConfig storage = m_config.getStorage();
      HdfsConfig hdfsConfig = storage.findHdfs(id);

      return toLong(hdfsConfig == null ? null : hdfsConfig.getMaxSize(), DEFAULT_HDFS_FILE_MAX_SIZE);
    } else {
      return DEFAULT_HDFS_FILE_MAX_SIZE;
    }
View Full Code Here


    }
  }

  public String getHdfsLocalBaseDir(String id) {
    if (m_config != null) {
      StorageConfig storage = m_config.getStorage();

      return new File(storage.getLocalBaseDir(), id).getPath();
    } else if (id == null) {
      return "target/bucket";
    } else {
      return "target/bucket/" + id;
    }
View Full Code Here

    return m_config;
  }

  public String getStorageLocalBaseDir() {
    if (m_config != null) {
      StorageConfig storage = m_config.getStorage();

      return storage.getLocalBaseDir();
    } else {
      return "target/bucket";
    }
  }
View Full Code Here

public class ServerConfigValidator extends DefaultValidator {
  @Override
  public void visitConfig(ServerConfig config) {
    if (config.getStorage() == null) {
      config.setStorage(new StorageConfig());
    }

    if (config.getConsumer() == null) {
      config.setConsumer(new ConsumerConfig());
    }
View Full Code Here

TOP

Related Classes of com.dianping.cat.configuration.server.entity.StorageConfig

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.