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
############################################################################# | |
### Please edit the values of the parameters below for your configuration ### | |
############################################################################# | |
$subscriptionName = "<Your Azure Subscription Name>" | |
$clusterName = "MyHDICluster" # HDInsight Cluster Name | |
############################################################################ | |
### End Edits ### | |
############################################################################ |
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
param | |
( | |
############################################################################# | |
### Please edit the values of the parameters below for your configuration ### | |
############################################################################# | |
[string]$PrimarySubscriptionName="<Your Subscription Name>", # Replace <Your Subscription Name> with your Azure subscription name | |
[string]$HDInsightClusterLocation="West US", # This is the data center where you are going to provision this HDInsight cluster | |
[string]$HDInsightClusterName="MyHDICluster", # This is the name that you want for the HDInsight cluster |
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
CREATE EXTERNAL TABLE IF NOT EXISTS WebFeeds | |
( | |
UserID int, | |
Message String | |
) | |
ROW FORMAT DELIMITED | |
FIELDS TERMINATED BY ',' | |
STORED AS TEXTFILE | |
LOCATION 'wasb://install@myprimarystorage.blob.core.windows.net/webfeeds'; | |
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 HiveUDF; | |
import java.util.regex.Matcher; | |
import java.util.regex.Pattern; | |
import org.apache.hadoop.hive.ql.exec.UDF; | |
public final class FindPattern extends UDF | |
{ | |
public static String evaluate(String targetString, String strPattern) | |
{ | |
// Pattern matching on the input pattern | |
Pattern p = Pattern.compile(strPattern); |
NewerOlder