创建 HIVE 表
CREATE EXTERNAL TABLE IF NOT EXISTS cloudfront_logs (
DateObject Date,
Time STRING,
Location STRING,
Bytes INT,
RequestIP STRING,
Method STRING,
Host STRING,
#! /bin/bash | |
# update the yum package | |
yum update -y | |
# Install the docker CE on CentOS via the repo | |
# setup the repo | |
yum install -y yum-utils device-mapper-persistent-data lvm2 | |
# use the stable version of docker CE |
/** | |
* This is a demo of KMS. | |
* | |
* This demo includes the following two features: | |
* 1. encrypt and decrypt using CMK (Customer Master Key) | |
* 2. encrypt and decrypt using data key (Envelope encryption using AWS KMS) | |
* | |
*/ | |
'use strict'; |
// Use this code snippet in your app. | |
// If you need more information about configurations or implementing the sample code, visit the AWS docs: | |
// https://aws.amazon.com/developers/getting-started/nodejs/ | |
// Load the AWS SDK | |
var AWS = require('aws-sdk'), | |
region = "us-west-2", | |
secretName = "aurora", | |
secret, | |
decodedBinarySecret; |
#!/bin/bash | |
# update & install compiler | |
apt-get update -y | |
apt-get install gcc -y | |
apt-get install build-essential -y | |
# pcre | |
wget ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-8.42.tar.gz | |
tar -zxf pcre-8.42.tar.gz |
// v1.1.2 | |
var https = require('https'); | |
var zlib = require('zlib'); | |
var crypto = require('crypto'); | |
var endpoint = '<elasticsearch-endpoint-in-your-vpc>'; // use elasticsearch in VPC | |
// Set this to true if you want to debug why data isn't making it to | |
// your Elasticsearch cluster. This will enable logging of failed items | |
// to CloudWatch Logs. |
```SQL | |
CREATE OR REPLACE STREAM "DESTINATION_SQL_STREAM" ("id" VARCHAR(4), "cp" VARCHAR(64), "ssp" VARCHAR(64), "pub" VARCHAR(64), | |
"total" INTEGER, "success" INTEGER, "conv" INTEGER, | |
"error_200" INTEGER, "error_300_ip" INTEGER, "error_300_la" INTEGER, "error_300_rf" INTEGER, "error_300_ua" INTEGER, "error_300_dm" INTEGER, "error_300_wd" INTEGER, | |
"error_400" INTEGER, "error_600" INTEGER); | |
CREATE OR REPLACE PUMP "STREAM_PUMP" AS INSERT INTO "DESTINATION_SQL_STREAM" | |
SELECT STREAM | |
"id", |
创建 HIVE 表
CREATE EXTERNAL TABLE IF NOT EXISTS cloudfront_logs (
DateObject Date,
Time STRING,
Location STRING,
Bytes INT,
RequestIP STRING,
Method STRING,
Host STRING,
pom.xml
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>org.example.basicapp</groupId>
<artifactId>myapp</artifactId>
<packaging>jar</packaging>
<version>1.0-SNAPSHOT</version>