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 table oauth_client_details ( | |
client_id VARCHAR(256) PRIMARY KEY, | |
resource_ids VARCHAR(256), | |
client_secret VARCHAR(256), | |
scope VARCHAR(256), | |
authorized_grant_types VARCHAR(256), | |
web_server_redirect_uri VARCHAR(256), | |
authorities VARCHAR(256), | |
access_token_validity INTEGER, | |
refresh_token_validity INTEGER, |
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
.metadata | |
bin/ | |
tmp/ | |
*.tmp | |
*.bak | |
*.swp | |
*~.nib | |
local.properties | |
.settings/ |
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
import org.apache.hadoop.fs._ | |
import org.apache.hadoop.conf.Configuration | |
import scala.collection.mutable.ListBuffer | |
object HdfsUtil { | |
val pf = new PathFilter { | |
override def accept(path: Path): Boolean = { |
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
/** | |
* This file contains the core idea of wrapping an underlying OutputFormat with an OutputFormat | |
* with an augmented key that writes to partitions using MultipleOutputs (or something similar) | |
*/ | |
package model.hadoop | |
import model.hadoop.HadoopIO.MultipleOutputer | |
import model.hadoop.HadoopIO.MultipleOutputer._ | |
import org.apache.hadoop.io.{DataInputBuffer, NullWritable} |
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
ADD JAR s3://<s3-bucket>/jars/hive_contrib-0.5.jar; | |
CREATE TEMPORARY FUNCTION now as 'com.mt.utils.udf.Now'; | |
CREATE TEMPORARY FUNCTION user_agent_f as 'com.mt.utils.UserAgent'; | |
set hive.merge.mapredfiles=true; | |
set hive.merge.mapfiles=true; | |
set hive.merge.size.per.task=500000000; | |
CREATE EXTERNAL TABLE data |
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
public class SortReducerByValues { | |
public static final String INPUT = "/tmp/data_in"; | |
public static final String OUTPUT = "/tmp/data_out"; | |
public static void main(String[] args) throws IOException { | |
new SortReducerByValues().run(); | |
} | |
public void run() throws IOException { | |
JobConf conf = new JobConf(); |
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 bash | |
# | |
# Copyright 2012 Zemian Deng | |
# | |
# Licensed under the Apache License, Version 2.0 (the "License"); | |
# you may not use this file except in compliance with the License. | |
# You may obtain a copy of the License at | |
# | |
# http://www.apache.org/licenses/LICENSE-2.0 | |
# |