This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; |