Skip to content

Instantly share code, notes, and snippets.

package com.bizo.hive.udtf;
import java.util.ArrayList;
import java.util.List;
import org.apache.hadoop.hive.ql.exec.UDFArgumentException;
import org.apache.hadoop.hive.ql.exec.Description;
import org.apache.hadoop.hive.ql.metadata.HiveException;
import org.apache.hadoop.hive.ql.udf.generic.GenericUDTF;
import org.apache.hadoop.hive.serde2.objectinspector.ObjectInspector;
#!/usr/bin/env ruby
#
# This Ruby script will convert between Amazon EC2 public and private DNS names.
#
# The first command-line argument is used as a regular expression to perform pattern-matching
# against leading strings of all public and private DNS names returned from an EC2 'describe-instances'
# API call. (ie, if the argument is 'domU', we will find all DNS names that match /domU.*/)
# Whenever a match is found, the "other" type of DNS name is printed. (private <=> public)
#
# Any arguments after the first are ignored.