Examples of ConfigManager


Examples of Manager.ConfigManager

        List<VideoFileVO> movieList = new ArrayList<VideoFileVO>();
        if (!hasMovieFile(download))
            return null;

        // if we use the language name on subtitle file name
        ConfigManager config = new ConfigManager(pluginInterface);
        SubTitleLanguage subTitleLanguage = null;
        if (config.getUseLanguageOnSubtitle())
            subTitleLanguage = config.getLanguageOnSubtitle();

        for (DiskManagerFileInfo fileTorrent : download.getDiskManagerFileInfo()) {
            if ((!fileTorrent.isSkipped()) && (!fileTorrent.isDeleted()) && (FileUtils.isMovieFile(fileTorrent.getFile().getName()))) {
                VideoFileVO movieVO = VoUtils.fileToMovieVO(fileTorrent.getFile(), subTitleLanguage);
                movieList.add(movieVO);
View Full Code Here

Examples of ServiceManager.ConfigManager

    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) {
        ConfigManager configManager = new ConfigManager();
        LogManager logManager = new LogManager(configManager);
        FilesManager filesManager = new FilesManager(configManager);

        DownloadManager downloadManager = new DownloadManager(configManager, filesManager, logManager);
        downloadManager.downloadSubTitles();
View Full Code Here

Examples of appeng.util.ConfigManager

  protected ContainerMEMonitorable(InventoryPlayer ip, ITerminalHost monitorable, boolean bindInventory) {
    super( ip, monitorable instanceof TileEntity ? (TileEntity) monitorable : null, monitorable instanceof IPart ? (IPart) monitorable : null );

    host = monitorable;
    clientCM = new ConfigManager( this );

    clientCM.registerSetting( Settings.SORT_BY, SortOrder.NAME );
    clientCM.registerSetting( Settings.VIEW_MODE, ViewItems.ALL );
    clientCM.registerSetting( Settings.SORT_DIRECTION, SortDir.ASCENDING );
View Full Code Here

Examples of com.cloudera.flume.master.ConfigManager

  /**
   * Create simple non translating FlowConfigManager
   */
  FlowConfigManager createSimple() {
    return new FlowConfigManager(new ConfigManager()) {
      @Override
      public ConfigurationManager createConfigMan() {
        return new ConfigManager();
      }
    };
  }
View Full Code Here

Examples of com.cloudera.flume.master.ConfigManager

   *
   * This exposes a hook to the deepest cfgMan which would ideally be a saved ZK
   * backed version being reloaded from a restarted master.
   */
  void buildMaster() throws IOException {
    cfgMan = new ConfigManager(FlumeMaster.createConfigStore(FlumeConfiguration
        .get()));
    StatusManager statman = new StatusManager();
    flowed = new FlowConfigManager.FailoverFlowConfigManager(cfgMan, statman);
    flumeMaster = new FlumeMaster(new CommandManager(), flowed, statman,
        new MasterAckManager(), FlumeConfiguration.get());
View Full Code Here

Examples of com.cloudera.flume.master.ConfigManager

   *
   * This exposes a hook to the deepest cfgMan which would ideally be a saved ZK
   * backed version being reloaded from a restarted master.
   */
  void buildMaster() throws IOException {
    cfgMan = new ConfigManager(FlumeMaster.createConfigStore(FlumeConfiguration
        .get()));
    StatusManager statman = new StatusManager();
    flowed = new FlowConfigManager.FailoverFlowConfigManager(cfgMan, statman);
    logical = new LogicalConfigurationManager(flowed, new ConfigManager(),
        statman);
    flumeMaster = new FlumeMaster(new CommandManager(), logical, statman,
        new MasterAckManager(), FlumeConfiguration.get());
  }
View Full Code Here

Examples of com.cloudera.flume.master.ConfigManager

  /**
   * Instantiate and expose managers
   */
  void setupNewManagers() {
    ConfigurationManager parent = new ConfigManager();
    ConfigurationManager self = new ConfigManager();
    FailoverChainManager fcMan = new ConsistentHashFailoverChainManager(3);
    ConfigurationManager self2 = new ConfigManager();

    failover = new FailoverConfigurationManager(parent, self2, fcMan);
    statman = new StatusManager();
    logical = new LogicalConfigurationManager(failover, self, statman);
    trans = logical;
View Full Code Here

Examples of com.cloudera.flume.master.ConfigManager

  /**
   * Test the core of the LogicalConfigManager
   */
  @Test
  public void testLogicalTrans() throws IOException, FlumeSpecException {
    ConfigurationManager parent = new ConfigManager();
    ConfigurationManager self = new ConfigManager();
    StatusManager statman = new StatusManager();
    ConfigurationManager trans = new LogicalConfigurationManager(parent, self,
        statman);

    // make it so that the local host info is present
    statman.updateHeartbeatStatus("foo", "foo", "foo", NodeState.HELLO, Clock
        .unixTime());
    statman.updateHeartbeatStatus("bar", "bar", "bar", NodeState.HELLO, Clock
        .unixTime());

    // Next spawn so that all are mapped onto a node and now gets a physical
    trans.addLogicalNode("foo", "foo");
    trans.addLogicalNode("bar", "bar");

    // now set configs
    trans.setConfig("foo", DEFAULTFLOW, "logicalSource", "null");
    trans.setConfig("bar", DEFAULTFLOW, "null", "logicalSink(\"foo\")");

    // update the configurations
    trans.updateAll();
    int port = FlumeConfiguration.get().getCollectorPort();

    // check if translated
    FlumeConfigData transData = trans.getConfig("bar");
    assertEquals("null", transData.getSourceConfig());
    assertEquals("rpcSink( \"foo\", " + port + " )", transData.getSinkConfig());

    FlumeConfigData transData2 = trans.getConfig("foo");
    assertEquals("rpcSource( " + port + " )", transData2.getSourceConfig());
    assertEquals("null", transData2.getSinkConfig());

    // self is same as translated
    FlumeConfigData selfData = self.getConfig("bar");
    assertEquals("null", selfData.getSourceConfig());
    assertEquals("rpcSink( \"foo\", " + port + " )", selfData.getSinkConfig());

    FlumeConfigData selfData2 = self.getConfig("foo");
    assertEquals("rpcSource( " + port + " )", selfData2.getSourceConfig());
    assertEquals("null", selfData2.getSinkConfig());

    // original is the user entered values
    FlumeConfigData origData = parent.getConfig("bar");
View Full Code Here

Examples of com.cloudera.flume.master.ConfigManager

   * Test the core of the LogicalConfigManager when it fails
   */
  @Test
  public void testLogicalTransFailSource() throws IOException,
      FlumeSpecException {
    ConfigurationManager parent = new ConfigManager();
    ConfigurationManager self = new ConfigManager();
    StatusManager statman = new StatusManager();
    ConfigurationManager trans = new LogicalConfigurationManager(parent, self,
        statman);

    // now set configs
View Full Code Here

Examples of com.cloudera.flume.master.ConfigManager

   * Test to ensure attempts to map a single logical node to multiple physicals
   * is discarded with a warning. This may be exception worthy.
   */
  @Test
  public void testDuplicateAssignment() {
    ConfigurationManager parent = new ConfigManager();
    ConfigurationManager self = new ConfigManager();
    StatusManager statman = new StatusManager();
    ConfigurationManager trans = new LogicalConfigurationManager(parent, self,
        statman);

    trans.addLogicalNode("hostA", "foo");
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.