@Test public void testIsInitialized_HasDataVersion() throws Exception { expect(fs.exists(anyObject(Path.class))).andReturn(false); expect(fs.exists(anyObject(Path.class))).andReturn(true); replay(sconf, zoo, fs); assertTrue(Initialize.isInitialized(fs, sconf)); }
public static boolean isInitialized(VolumeManager fs, SiteConfiguration siteConfig) throws IOException { for (String baseDir : VolumeConfiguration.getVolumeUris(siteConfig)) { if (fs.exists(new Path(baseDir, ServerConstants.INSTANCE_ID_DIR)) || fs.exists(new Path(baseDir, ServerConstants.VERSION_DIR))) { return true; } } return false; }
Initialize implements KeywordExecutable { public static boolean isInitialized(VolumeManager fs, SiteConfiguration siteConfig) throws IOException { for (String baseDir : VolumeConfiguration.getVolumeUris(siteConfig)) { if (fs.exists(new Path(baseDir, ServerConstants.INSTANCE_ID_DIR)) || fs.exists(new Path(baseDir, ServerConstants.VERSION_DIR))) { return true; } } return false; } }
Initialize implements KeywordExecutable { public static boolean isInitialized(VolumeManager fs, SiteConfiguration siteConfig) throws IOException { for (String baseDir : VolumeConfiguration.getVolumeUris(siteConfig)) { if (fs.exists(new Path(baseDir, ServerConstants.INSTANCE_ID_DIR)) || fs.exists(new Path(baseDir, ServerConstants.VERSION_DIR))) { return true; } } return false; }  }
Initialize implements KeywordExecutable { public static boolean isInitialized(VolumeManager fs, SiteConfiguration siteConfig) throws IOException { for (String baseDir : VolumeConfiguration.getVolumeUris(siteConfig)) { if (fs.exists(new Path(baseDir, ServerConstants.INSTANCE_ID_DIR)) || fs.exists(new Path(baseDir, ServerConstants.VERSION_DIR))) { return true; } } return false; }  boolean doInit(SiteConfiguration siteConfig, Opts opts, Configuration hadoopConf,
      VolumeManager fs); static void initSystemTablesConfig(ZooReaderWriter zoo, String zooKeeperRoot,
      Configuration hadoopConf); static boolean isInitialized(VolumeManager fs, SiteConfiguration siteConfig); @Override String keyword(); @Override UsageGroup usageGroup(); @Override String description(); @Override void execute(final String[] args); static void main(String[] args); }
Initialize implements KeywordExecutable { public static boolean isInitialized(VolumeManager fs, SiteConfiguration siteConfig) throws IOException { for (String baseDir : VolumeConfiguration.getVolumeUris(siteConfig)) { if (fs.exists(new Path(baseDir, ServerConstants.INSTANCE_ID_DIR)) || fs.exists(new Path(baseDir, ServerConstants.VERSION_DIR))) { return true; } } return false; }  boolean doInit(SiteConfiguration siteConfig, Opts opts, Configuration hadoopConf,
      VolumeManager fs); static void initSystemTablesConfig(ZooReaderWriter zoo, String zooKeeperRoot,
      Configuration hadoopConf); static boolean isInitialized(VolumeManager fs, SiteConfiguration siteConfig); @Override String keyword(); @Override UsageGroup usageGroup(); @Override String description(); @Override void execute(final String[] args); static void main(String[] args);  }