Skip to content

Instantly share code, notes, and snippets.

View sardell's full-sized avatar

Shane Ardell sardell

View GitHub Profile
@sardell
sardell / nifi-update-ui-and-run.sh
Created December 22, 2021 15:46
Update NiFi UI and Run Script
#!/bin/bash
NIFI_VERSION=${1:-"1.16.0-SNAPSHOT"}
echo "NIFI_VERSION: $NIFI_VERSION"
# build nifi-web-ui
cd $HOME/projects/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui
mvn clean install -P\!minify-and-compress
# build nifi-server and copy into target lib directory
TASK [metron-builder : Build Metron RPM Packages] ******************************
failed: [node1 -> localhost] (item=mvn package -DskipTests -Pbuild-rpms -T 2C) => {"changed": true, "cmd": "mvn package -DskipTests -Pbuild-rpms -T 2C", "delta": "0:02:51.127829", "end": "2019-09-12 13:10:15.314874", "item": "mvn package -DskipTests -Pbuild-rpms -T 2C", "msg": "non-zero return code", "rc": 1, "start": "2019-09-12 13:07:24.187045", "stderr": "error: Macro %_prerelease has empty body\nerror: Macro %_prerelease has empty body\n+ umask 022\n+ cd /root/BUILD\n+ LANG=C\n+ export LANG\n+ unset DISPLAY\n+ rm -rf '/root/RPMS/noarch/metron-0.7.2*'\n+ rm -rf '/root/SRPMS/metron-0.7.2*'\n+ exit 0\n+ umask 022\n+ cd /root/BUILD\n+ LANG=C\n+ export LANG\n+ unset DISPLAY\n+ rm -rf /root/BUILD\n+ mkdir -p /root/BUILD/metron-0.7.2\n+ exit 0\n+ umask 022\n+ cd /root/BUILD\n+ '[' /root/BUILDROOT/metron-0.7.2-root '!=' / ']'\n+ rm -rf /root/BUILDROOT/metron-0.7.2-root\n++ dirname /root/BUILDROOT/metron-0.7.2-root\n+ mkdir -p /root/B

METRON-1749: Update Angular to latest release in Management UI

Contributor Comments

Link to ASF JIRA ticket: https://issues.apache.org/jira/browse/METRON-1749

This Pull Request contains work which updates the Management UI's version of Angular from version 2.0.0 to version 6.1.8. A few benefits we get from this:

  • We gain new Angular features, such as Ahead-of-Time compiling, the new HttpClient library, ng update and Http Interceptors.
  • All npm dependencies now pass an npm vulnerability audit.
  • We are able to use rxjs version 6, which includes easier import paths and pipe method chaining.
@sardell
sardell / metron-get-updates.md
Last active February 18, 2019 16:16
Metron quick reset to get middleware and backend updates

WARNING: Doesn’t work for Ambari or Mpack updates

Here are the instructions for "quickly" getting middleware and backend updates without a full-dev rebuild:

  1. Run mvn clean install -Dskip from the root of your local metron project
  2. From metron-deployment/development/centos6, run vagrant scp ../../../metron-interface/metron-rest/target/metron-rest*.jar /tmp
  3. Log into vagrant by navigating into metron-deployment/development/centos6 and running vagrant ssh
  4. While ssh'd inside the vagrant machine, run sudo cp /tmp/metron-rest*.jar /usr/metron/$METRON_VERSION/lib
  5. Open a browser, visit Ambari (http://node1:8080) and reset (or start) METRON REST
@sardell
sardell / flatten.js
Created August 1, 2016 19:33
Flatten Nested Array with ES2015
// This example uses ES2015 features. Use Babel to compile down to JS, or see the example at http://codepen.io/sardell/pen/VjGYRz
// example array provided
var example = [[1,2,[3]],4];
function flatten_array(nested) {
// concatenate using the spread operator
const flat = [].concat(...nested)
// repeat flatten_array function until nested array is flat
return flat.some(Array.isArray) ? flatten_array(flat) : flat;