public static void main(String[] args) { LOG.debug("version: "+ version); System.out.println("Hive " + getVersion()); System.out.println("Git " + getUrl() + " -r " + getRevision()); System.out.println("Compiled by " + getUser() + " on " + getDate()); System.out.println("From source with checksum " + getSrcChecksum()); }
@Override public String getHiveSchemaVersion() { String hiveVersion = MetastoreVersionInfo.getShortVersion(); return getEquivalentVersion(hiveVersion); }
/** * Returns the buildVersion which includes version, * revision, user and date. */ public static String getBuildVersion(){ return MetastoreVersionInfo.getVersion() + " from " + MetastoreVersionInfo.getRevision() + " by " + MetastoreVersionInfo.getUser() + " source checksum " + MetastoreVersionInfo.getSrcChecksum(); }
/** * Returns the buildVersion which includes version, * revision, user and date. */ public static String getBuildVersion(){ return MetastoreVersionInfo.getVersion() + " from " + MetastoreVersionInfo.getRevision() + " by " + MetastoreVersionInfo.getUser() + " source checksum " + MetastoreVersionInfo.getSrcChecksum(); }
/** * Print a log message for starting up and shutting down * @param clazz the class of the server * @param args arguments * @param LOG the target log object */ private static void startupShutdownMessage(Class<?> clazz, String[] args, final org.slf4j.Logger LOG) { final String hostname = getHostname(); final String classname = clazz.getSimpleName(); LOG.info( toStartupShutdownString("STARTUP_MSG: ", new String[] { "Starting " + classname, " host = " + hostname, " args = " + Arrays.asList(args), " version = " + MetastoreVersionInfo.getVersion(), " classpath = " + System.getProperty("java.class.path"), " build = " + MetastoreVersionInfo.getUrl() + " -r " + MetastoreVersionInfo.getRevision() + "; compiled by '" + MetastoreVersionInfo.getUser() + "' on " + MetastoreVersionInfo.getDate()} ) ); shutdownHookMgr.addShutdownHook( () -> LOG.info(toStartupShutdownString("SHUTDOWN_MSG: ", new String[]{ "Shutting down " + classname + " at " + hostname})), 0); }
@Override public String getHiveSchemaVersion() { String hiveVersion = MetastoreVersionInfo.getShortVersion(); return getEquivalentVersion(hiveVersion); }
public static void main(String[] args) { LOG.debug("version: "+ version); System.out.println("Hive " + getVersion()); System.out.println("Git " + getUrl() + " -r " + getRevision()); System.out.println("Compiled by " + getUser() + " on " + getDate()); System.out.println("From source with checksum " + getSrcChecksum()); }
/** * Print a log message for starting up and shutting down * @param clazz the class of the server * @param args arguments * @param LOG the target log object */ private static void startupShutdownMessage(Class<?> clazz, String[] args, final org.slf4j.Logger LOG) { final String hostname = getHostname(); final String classname = clazz.getSimpleName(); LOG.info( toStartupShutdownString("STARTUP_MSG: ", new String[] { "Starting " + classname, " host = " + hostname, " args = " + Arrays.asList(args), " version = " + MetastoreVersionInfo.getVersion(), " classpath = " + System.getProperty("java.class.path"), " build = " + MetastoreVersionInfo.getUrl() + " -r " + MetastoreVersionInfo.getRevision() + "; compiled by '" + MetastoreVersionInfo.getUser() + "' on " + MetastoreVersionInfo.getDate()} ) ); shutdownHookMgr.addShutdownHook( () -> LOG.info(toStartupShutdownString("SHUTDOWN_MSG: ", new String[]{ "Shutting down " + classname + " at " + hostname})), 0); }