public void printBanner(PrintStream out) { try { InputStream banner = HadoopUtils.class.getResourceAsStream("/banner.txt"); BufferedReader br = new BufferedReader(new InputStreamReader(banner)); String line = null; while ((line = br.readLine()) != null) { printColorLine(out, BLUE, line); } } catch (Exception ex) { LOGGER.warn("Banner not printable", ex); } }
public void printBanner(PrintStream out) { try { InputStream banner = HadoopUtils.class.getResourceAsStream("/banner.txt"); BufferedReader br = new BufferedReader(new InputStreamReader(banner)); String line = null; while ((line = br.readLine()) != null) { printColorLine(out, BLUE, line); } } catch (Exception ex) { LOGGER.warn("Banner not printable", ex); } }
private void internalStart(List<Bootstrap> componentsToStart) { componentsToStart.forEach(this::startService); HadoopUtils.INSTANCE.printBanner(System.out); componentsToStart.forEach(c -> HadoopUtils.printColorLine(System.out, GREEN, "\t\t - " + c.getName() + " " + c.getProperties())); System.out.println(); }
private void internalStart(List<Bootstrap> componentsToStart) { componentsToStart.forEach(this::startService); HadoopUtils.INSTANCE.printBanner(System.out); componentsToStart.forEach(c -> HadoopUtils.printColorLine(System.out, GREEN, "\t\t - " + c.getName() + " " + c.getProperties())); System.out.println(); }
private static void printBanner() { HadoopUtils.INSTANCE.printBanner(System.out); componentsProperty.stream().forEach(c -> { Object name = null; Object prop = null; if (c != null) { try { Method main = c.getMainClass().getMethod("getName"); name = main.invoke(c.getInstance()); main = c.getMainClass().getMethod("getProperties"); prop = main.invoke(c.getInstance()); } catch (NoSuchMethodException | IllegalAccessException | InvocationTargetException e) { LOGGER.error("unable to reflect main", e); } HadoopUtils.printColorLine(System.out, GREEN, "\t\t - " + name + " " + prop); } }); System.out.println(); }
private void printBanner() { HadoopUtils.INSTANCE.printBanner(System.out); componentProperties.stream().forEach(c -> { Object name = null; Object prop = null; if (c != null) { try { Method main = c.getMainClass().getMethod("getName"); name = main.invoke(c.getInstance()); main = c.getMainClass().getMethod("getProperties"); prop = main.invoke(c.getInstance()); } catch (NoSuchMethodException | IllegalAccessException | InvocationTargetException e) { log.error("unable to reflect main", e); } HadoopUtils.printColorLine(System.out, GREEN, "\t\t - " + name + " " + prop); } }); System.out.println(); }