public SecondaryNameNode(Configuration conf, CommandLineOpts commandLineOpts) throws IOException { try { String nsId = DFSUtil.getSecondaryNameServiceId(conf); if (HAUtil.isHAEnabled(conf, nsId)) { throw new IOException( "Cannot use SecondaryNameNode in an HA cluster." + " The Standby Namenode will perform checkpointing."); } NameNode.initializeGenericKeys(conf, nsId, null); initialize(conf, commandLineOpts); } catch (IOException e) { shutdown(); throw e; } catch (HadoopIllegalArgumentException e) { shutdown(); throw e; } }
@Override protected void doDelete(SecondaryNameNode service) throws Exception { service.shutdown(); }
/** * Create a connection to the primary namenode. */ public SecondaryNameNode(Configuration conf) throws IOException { try { initialize(conf); } catch(IOException e) { shutdown(); throw e; } }
/** * Create a connection to the primary namenode. */ public SecondaryNameNode(Configuration conf) throws IOException { try { initialize(conf); } catch(IOException e) { shutdown(); throw e; } }
/** * Check whether the secondary name-node can be started. */ @SuppressWarnings("deprecation") private boolean canStartSecondaryNode(Configuration conf) throws IOException { // Using full name allows us not to have to add deprecation tag to // entire source file. org.apache.hadoop.hdfs.server.namenode.SecondaryNameNode sn = null; try { sn = new org.apache.hadoop.hdfs.server.namenode.SecondaryNameNode(conf); } catch(IOException e) { if (e instanceof java.net.BindException) return false; throw e; } finally { if(sn != null) sn.shutdown(); } return true; }
private static void cleanup(SecondaryNameNode snn) { if (snn != null) { try { snn.shutdown(); } catch (Exception e) { LOG.warn("Could not shut down secondary namenode", e); } } }
public SecondaryNameNode(Configuration conf, CommandLineOpts commandLineOpts) throws IOException { try { String nsId = DFSUtil.getSecondaryNameServiceId(conf); if (HAUtil.isHAEnabled(conf, nsId)) { throw new IOException( "Cannot use SecondaryNameNode in an HA cluster." + " The Standby Namenode will perform checkpointing."); } NameNode.initializeGenericKeys(conf, nsId, null); initialize(conf, commandLineOpts); } catch (IOException e) { shutdown(); throw e; } catch (HadoopIllegalArgumentException e) { shutdown(); throw e; } }
public SecondaryNameNode(Configuration conf, CommandLineOpts commandLineOpts) throws IOException { try { String nsId = DFSUtil.getSecondaryNameServiceId(conf); if (HAUtil.isHAEnabled(conf, nsId)) { throw new IOException( "Cannot use SecondaryNameNode in an HA cluster." + " The Standby Namenode will perform checkpointing."); } NameNode.initializeGenericKeys(conf, nsId, null); initialize(conf, commandLineOpts); } catch (IOException e) { shutdown(); throw e; } catch (HadoopIllegalArgumentException e) { shutdown(); throw e; } }
/** * Check whether the secondary name-node can be started. */ @SuppressWarnings("deprecation") private boolean canStartSecondaryNode(Configuration conf) throws IOException { // Using full name allows us not to have to add deprecation tag to // entire source file. org.apache.hadoop.hdfs.server.namenode.SecondaryNameNode sn = null; try { sn = new org.apache.hadoop.hdfs.server.namenode.SecondaryNameNode(conf); } catch(IOException e) { if (e instanceof java.net.BindException) return false; throw e; } finally { if(sn != null) sn.shutdown(); } return true; }
@AfterClass public static void shutDownCluster() { if (cluster != null) { cluster.shutdown(); } if (snn != null) { snn.shutdown(); } }
} finally { if(sn!=null) sn.shutdown(); if(cluster!=null) cluster.shutdown();
checkFiles(true); secondary.shutdown(); cluster.shutdown();
+ " must be trimmed ", checkpointEditsDir2.exists()); } finally { secondary.shutdown(); cluster.shutdown();
} finally { if(sn!=null) sn.shutdown(); if(cluster!=null) cluster.shutdown();
} finally { if (secondary != null) { secondary.shutdown();
IOUtils.cleanup(null, dfs); if (snn != null) { snn.shutdown();
secondary.shutdown(); secondary = null;