@@ -0,0 +1,2133 @@
+package parquet;%0A%0Aimport java.io.IOException;%0Aimport java.net.URL;%0Aimport java.util.Enumeration;%0Aimport java.util.Properties;%0Aimport java.util.jar.Manifest;%0A%0A%0Apublic class Version %7B%0A  private static final Log LOG = Log.getLog(Version.class);%0A%0A  public static final String FULL_VERSION = readVersion();%0A%0A  private static String getJarPath() %7B%0A    final URL versionClassBaseUrl = Version.class.getResource(%22%22);%0A    if (versionClassBaseUrl.getProtocol().equals(%22jar%22)) %7B%0A      String path = versionClassBaseUrl.getPath();%0A      int jarEnd = path.indexOf(%22!%22);%0A      if (jarEnd != -1) %7B%0A        String jarPath = path.substring(0, jarEnd);%0A        return jarPath;%0A      %7D%0A    %7D%0A    return null;%0A  %7D%0A%0A  private static URL getResourceFromJar(String jarPath, String path) throws IOException %7B%0A    Enumeration%3CURL%3E resources = Version.class.getClassLoader().getResources(path);%0A    while (resources.hasMoreElements()) %7B%0A      URL url = resources.nextElement();%0A      if (url.getProtocol().equals(%22jar%22) && url.getPath().startsWith(jarPath)) %7B%0A        return url;%0A      %7D%0A    %7D%0A    return null;%0A  %7D%0A%0A  private static String readVersion() %7B%0A    String version = null;%0A    String sha = null;%0A    try %7B%0A      String jarPath = getJarPath();%0A      if (jarPath != null) %7B%0A        URL pomPropertiesUrl = getResourceFromJar(jarPath, %22META-INF/maven/com.twitter/parquet-column/pom.properties%22);%0A        if (pomPropertiesUrl != null) %7B%0A          Properties properties = new Properties();%0A          properties.load(pomPropertiesUrl.openStream());%0A          version = properties.getProperty(%22version%22);%0A        %7D%0A        URL manifestUrl = getResourceFromJar(jarPath, %22META-INF/MANIFEST.MF%22);%0A        if (manifestUrl != null) %7B%0A          Manifest manifest = new Manifest(manifestUrl.openStream());%0A          sha = manifest.getMainAttributes().getValue(%22git-SHA-1%22);%0A        %7D%0A      %7D%0A    %7D catch (Exception e) %7B%0A      LOG.warn(%22can't read from META-INF%22, e);%0A    %7D%0A    return %22parquet-mr%22 + (version != null ? %22 %22 + version : %22%22) + (sha != null ? %22 %22 + sha : %22%22);%0A  %7D%0A%0A  public static void main(String%5B%5D args) %7B%0A    System.out.println(FULL_VERSION);%0A  %7D%0A%7D%0A

read version information from META-INF