/** * This is a validation of the application configuration on the AM. Here is where things like the * existence of keytabs and other not-seen-client-side properties can be tested, before the actual * process is spawned. * * @param instanceDefinition clusterSpecification * @param confDir configuration directory * @param secure flag to indicate that secure mode checks must exist * @throws IOException IO problemsn * @throws SliderException any failure */ @Override public void validateApplicationConfiguration( AggregateConf instanceDefinition, File confDir, boolean secure) throws IOException, SliderException { String siteXMLFilename = SITE_XML; File siteXML = new File(confDir, siteXMLFilename); if (!siteXML.exists()) { throw new BadCommandArgumentsException( "Configuration directory %s doesn't contain %s - listing is %s", confDir, siteXMLFilename, SliderUtils.listDir(confDir)); } // now read it in siteConf = ConfigHelper.loadConfFromFile(siteXML); // look in the site spec to see that it is OK clientProvider.validateHBaseSiteXML(siteConf, secure, siteXMLFilename); if (secure) { // secure mode: take a look at the keytab of master and RS SliderUtils.verifyKeytabExists(siteConf, HBaseConfigFileOptions.KEY_MASTER_KERBEROS_KEYTAB); SliderUtils.verifyKeytabExists( siteConf, HBaseConfigFileOptions.KEY_REGIONSERVER_KERBEROS_KEYTAB); } }