adhocshare Blog

0

Apache Ranger tips and tid bits

1. Error syncing users Observation: org/apache/commons/httpclient/URIException in ranger log ERROR UserGroupSync [UnixUserSyncThread] – Failed to synchronize UserGroup information. Error details: java.lang.NoClassDefFoundError: org/apache/commons/httpclient/URIException at org.apache.ranger.unixusersync.process.PolicyMgrUserGroupBuilder.delXUserGroupInfo(PolicyMgrUserGroupBuilder.java:615) at org.apache.ranger.unixusersync.process.PolicyMgrUserGroupBuilder.delXUserGroupInfo(PolicyMgrUserGroupBuilder.java:600) at org.apache.ranger.unixusersync.process.PolicyMgrUserGroupBuilder.addOrUpdateUser(PolicyMgrUserGroupBuilder.java:326) at org.apache.ranger.unixusersync.process.FileSourceUserGroupBuilder.updateSink(FileSourceUserGroupBuilder.java:97) at org.apache.ranger.usergroupsync.UserGroupSync.syncUserGroup(UserGroupSync.java:113) at org.apache.ranger.usergroupsync.UserGroupSync.run(UserGroupSync.java:87) at java.lang.Thread.run(Thread.java:745) Caused by: java.lang.ClassNotFoundException: org.apache.commons.httpclient.URIException at...

0

Mac OS tips

Change hostname   Change hostname $ sudo scutil –-set HostName <new hostname>   Related posts: Super charge bash with these bash_profile tips SSH Auto completion on OSX Can’t connect Excel to Hive using ODBC driver on MAC brew packages and...

0

Git .gitignore file sample

Source: https://github.com/github/gitignore/blob/master/Global/JetBrains.gitignore Use the following .gitignore from Jetbrains. # Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio and Webstorm # Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839 # User-specific stuff: .idea/workspace.xml .idea/tasks.xml # Sensitive or high-churn files: .idea/dataSources/ .idea/dataSources.ids .idea/dataSources.xml .idea/dataSources.local.xml .idea/sqlDataSources.xml .idea/dynamic.xml .idea/uiDesigner.xml...

0

git scm references

References https://www.garron.me/en/articles/git-linux-mac-private-server.html https://coderwall.com/p/9lzkww/setting-up-a-git-daemon-on-mac-os-x Simple Git server – https://itunes.apple.com/us/app/simple-git-server/id1040403936?mt=12 https://github.com/bard/sameplace/wiki/Getting-started-with-git   Related posts: A nice .vimrc A Secure HDFS Client Example Hadoop Hive UDTF Tutorial – Extending Apache Hive with Table Functions Parsing XML using JAXB in Java

0

Parsing XML using JAXB in Java

Process Objective is to create Java class files that represent schema from the XML data. Create XSD from XML Generators: http://www.freeformatter.com/xsd-generator.html, http://xmlgrid.net/xml2xsd.html, https://devutilsonline.com/xsd-xml/generate-xsd-from-xml Use xjc on XSD to create JAXB Java classes $xjc sample.xsd Creates a generated/ folder in the same...

0

SAX v/s DOM. How to choose between DOM and SAX?

Source: http://geekexplains.blogspot.com/2009/04/sax-vs-dom-differences-between-dom-and.html Differences between DOM and SAX. When to use what? Before going through the differences, if you need a refresh of what SAX and DOM are, please refer to this article – SAX, DOM, JAXP, & JDOM >>. While comparing...

0

AWK Syntax

AWK syntax: awk [-Fs] “program” [file1 file2…] # commands come from DOS cmdline awk ‘program{print “foo”}’ file1 # single quotes around double quotes # NB: Don’t use single quotes alone if the embedded info will contain the # vertical bar...

0

Chart of similar operations with sed and awk

Chart of similar operations with sed and awk ——————————————– string ====== sed “s/from/to/” awk ‘{sub(“from”,”to”); print}’ sed “s/from/to/g” awk ‘{gsub(“from”,”to”); print}’ sed “s/from/to/3” awk ‘{$0=gensub(“from”,”to”,3); print}’ regex ===== sed “s/reg.*$/_&_/” awk ‘{sub(/reg.*$/, “_&_”); print}’ sed “s/reg[ex]/YY/g” awk ‘{gsub(/reg[ex]/, “YY”); print}’...

0

awk one liners

HANDY ONE-LINE SCRIPTS FOR AWK 30 April 2008 Compiled by Eric Pement – eric [at] pement.org version 0.27 Latest version of this file (in English) is usually at: http://www.pement.org/awk/awk1line.txt This file will also be available in other languages: Chinese -...