NiFi Operations
https://community.hortonworks.com/articles/183217/devops-backing-up-apache-nifi-registry-flows.html
pip3 install pyhs100
pip3 install psutil
- {
- "type": "record",
- "name": "rainbow",
- "fields": [
- {
- "name": "tempf",
- "type": "double",
- "doc": "Type inferred from '84.15'"
- },
- {
- "name": "cputemp",
- "type": "double",
- "doc": "Type inferred from '53.0'"
- },
- {
- "name": "pressure",
- "type": "double",
- "doc": "Type inferred from '101028.56'"
- },
- {
- "name": "host",
- "type": "string",
- "doc": "Type inferred from '\"rainbow\"'"
- },
- {
- "name": "uniqueid",
- "type": "string",
- "doc": "Type inferred from '\"rainbow_uuid_20180718234222\"'"
- },
- {
- "name": "ipaddress",
- "type": "string",
- "doc": "Type inferred from '\"192.168.1.165\"'"
- },
- {
- "name": "temp",
- "type": "double",
- "doc": "Type inferred from '38.58'"
- },
- {
- "name": "diskfree",
- "type": "string",
- "doc": "Type inferred from '\"4831.2 MB\"'"
- },
- {
- "name": "altitude",
- "type": "double",
- "doc": "Type inferred from '80.65'"
- },
- {
- "name": "ts",
- "type": "string",
- "doc": "Type inferred from '\"2018-07-18 23:42:22\"'"
- },
- {
- "name": "tempf2",
- "type": "double",
- "doc": "Type inferred from '28.97'"
- },
- {
- "name": "memory",
- "type": "double",
- "doc": "Type inferred from '32.3'"
- }
- ]
- }
- {
- "type": "record",
- "name": "gps",
- "fields": [
- {
- "name": "speed",
- "type": "string",
- "doc": "Type inferred from '\"0.066\"'"
- },
- {
- "name": "diskfree",
- "type": "string",
- "doc": "Type inferred from '\"4830.3 MB\"'"
- },
- {
- "name": "altitude",
- "type": "string",
- "doc": "Type inferred from '\"43.0\"'"
- },
- {
- "name": "ts",
- "type": "string",
- "doc": "Type inferred from '\"2018-07-18 23:46:39\"'"
- },
- {
- "name": "cputemp",
- "type": "double",
- "doc": "Type inferred from '54.0'"
- },
- {
- "name": "latitude",
- "type": "string",
- "doc": "Type inferred from '\"40.2681555\"'"
- },
- {
- "name": "track",
- "type": "string",
- "doc": "Type inferred from '\"0.0\"'"
- },
- {
- "name": "memory",
- "type": "double",
- "doc": "Type inferred from '32.3'"
- },
- {
- "name": "host",
- "type": "string",
- "doc": "Type inferred from '\"rainbow\"'"
- },
- {
- "name": "uniqueid",
- "type": "string",
- "doc": "Type inferred from '\"gps_uuid_20180718234640\"'"
- },
- {
- "name": "ipaddress",
- "type": "string",
- "doc": "Type inferred from '\"192.168.1.165\"'"
- },
- {
- "name": "epd",
- "type": "string",
- "doc": "Type inferred from '\"nan\"'"
- },
- {
- "name": "utc",
- "type": "string",
- "doc": "Type inferred from '\"2018-07-18T23:46:40.000Z\"'"
- },
- {
- "name": "epx",
- "type": "string",
- "doc": "Type inferred from '\"40.135\"'"
- },
- {
- "name": "epy",
- "type": "string",
- "doc": "Type inferred from '\"42.783\"'"
- },
- {
- "name": "epv",
- "type": "string",
- "doc": "Type inferred from '\"171.35\"'"
- },
- {
- "name": "ept",
- "type": "string",
- "doc": "Type inferred from '\"0.005\"'"
- },
- {
- "name": "eps",
- "type": "string",
- "doc": "Type inferred from '\"85.57\"'"
- },
- {
- "name": "longitude",
- "type": "string",
- "doc": "Type inferred from '\"-74.529094\"'"
- },
- {
- "name": "mode",
- "type": "string",
- "doc": "Type inferred from '\"3\"'"
- },
- {
- "name": "time",
- "type": "string",
- "doc": "Type inferred from '\"2018-07-18T23:46:40.000Z\"'"
- },
- {
- "name": "climb",
- "type": "string",
- "doc": "Type inferred from '\"0.0\"'"
- },
- {
- "name": "epc",
- "type": "string",
- "doc": "Type inferred from '\"nan\"'"
- }
- ]
- }
- %sql
- CREATE EXTERNAL TABLE IF NOT EXISTS movidiussense (label5 STRING, runtime STRING, label1 STRING, diskfree STRING, top1 STRING, starttime STRING, label2 STRING, label3 STRING, top3pct STRING, host STRING, top5pct STRING, humidity DOUBLE, currenttime STRING, roll DOUBLE, uuid STRING, label4 STRING, tempf DOUBLE, y DOUBLE, top4pct STRING, cputemp2 DOUBLE, top5 STRING, top2pct STRING, ipaddress STRING, cputemp INT, pitch DOUBLE, x DOUBLE, z DOUBLE, yaw DOUBLE, pressure DOUBLE, top3 STRING, temp DOUBLE, memory DOUBLE, top4 STRING, imagefilename STRING, top1pct STRING, top2 STRING) STORED AS ORC LOCATION '/movidiussense'
- %sql
- CREATE EXTERNAL TABLE IF NOT EXISTS minitensorflow2 (image STRING, ts STRING, host STRING, score STRING, human_string STRING, node_id INT) STORED AS ORC LOCATION '/minifitensorflow2'
- %sql
- CREATE EXTERNAL TABLE IF NOT EXISTS gps (speed STRING, diskfree STRING, altitude STRING, ts STRING, cputemp DOUBLE, latitude STRING, track STRING, memory DOUBLE, host STRING, uniqueid STRING, ipaddress STRING, epd STRING, utc STRING, epx STRING, epy STRING, epv STRING, ept STRING, eps STRING, longitude STRING, mode STRING, time STRING, climb STRING, epc STRING) STORED AS ORC LOCATION '/gps'
- %sql
- CREATE EXTERNAL TABLE IF NOT EXISTS rainbow (tempf DOUBLE, cputemp DOUBLE, pressure DOUBLE, host STRING, uniqueid STRING, ipaddress STRING, temp DOUBLE, diskfree STRING, altitude DOUBLE, ts STRING,
- tempf2 DOUBLE, memory DOUBLE) STORED AS ORC LOCATION '/rainbow'