Member since
10-01-2015
3933
Posts
1150
Kudos Received
374
Solutions
My Accepted Solutions
Title | Views | Posted |
---|---|---|
3365 | 05-03-2017 05:13 PM | |
2796 | 05-02-2017 08:38 AM | |
3076 | 05-02-2017 08:13 AM | |
3006 | 04-10-2017 10:51 PM | |
1517 | 03-28-2017 02:27 AM |
01-06-2016
01:41 PM
1 Kudo
@Raja Ray are all standard requirements set, i.e. ulimit, swappiness? Also, can you check the disk health? Also, what OS are you running, in case of RPM based, do you have Transparent Huge Pages off?
... View more
01-06-2016
01:36 PM
I think this calls for a jira with Ambari for advisor?
... View more
01-06-2016
02:23 AM
2 Kudos
@Sebastian Hans it's a known bug with Mac OSX 10.11. Please wait for the next version, more details here https://community.hortonworks.com/articles/3364/hi...
... View more
01-06-2016
12:40 AM
Glad that's its not an abandoned feature. Are there more examples and/or docs available? I created a few of my own but I think we need better examples. Thank you @gopal
... View more
01-05-2016
09:21 PM
if you use tarball, then Windows 7 with 4GB of RAM is fine. Yes, you'd need to download the Apache distribution for that. If you use Ambari, it will automatically pull Hortonworks distribution and you can pick and choose what to install, thereby overcoming your memory limit.
... View more
01-05-2016
09:01 PM
great, please try your sqoop query with --direct flag, should improve your performance in general. Other than that, please accept one of the answers to close the issue.
... View more
01-05-2016
08:25 PM
3 Kudos
Groovy UDF example Can be compiled at run time Currently only works in "hive" shell, does not work in beeline <code>su guest
hive
paste the following code into the hive shellthis will use Groovy String replace function to replace all instances of lower case 'e' with 'E' <code>compile `import org.apache.hadoop.hive.ql.exec.UDF \;
import org.apache.hadoop.io.Text \;
public class Replace extends UDF {
public Text evaluate(Text s){
if (s == null) return null \;
return new Text(s.toString().replace('e', 'E')) \;
}
} ` AS GROOVY NAMED Replace.groovy;
now create a temporary function to leverage the Groovy UDF <code>CREATE TEMPORARY FUNCTION Replace as 'Replace';
now you can use the function in your SQL <code>SELECT Replace(description) FROM sample_08 limit 5;
full example <code>hive> compile `import org.apache.hadoop.hive.ql.exec.UDF \;
> import org.apache.hadoop.io.Text \;
> public class Replace extends UDF {
> public Text evaluate(Text s){
> if (s == null) return null \;
> return new Text(s.toString().replace('e', 'E')) \;
> }
> } ` AS GROOVY NAMED Replace.groovy;
Added [/tmp/0_1452022176763.jar] to class path
Added resources: [/tmp/0_1452022176763.jar]
hive> CREATE TEMPORARY FUNCTION Replace as 'Replace';
OK
Time taken: 1.201 seconds
hive> SELECT Replace(description) FROM sample_08 limit 5;
OK
All Occupations
ManagEmEnt occupations
ChiEf ExEcutivEs
GEnEral and opErations managErs
LEgislators
Time taken: 6.373 seconds, Fetched: 5 row(s)
hive>
Another example this will duplicate any String passed to the function <code>compile `import org.apache.hadoop.hive.ql.exec.UDF \;
import org.apache.hadoop.io.Text \;
public class Duplicate extends UDF {
public Text evaluate(Text s){
if (s == null) return null \;
return new Text(s.toString() * 2) \;
}
} ` AS GROOVY NAMED Duplicate.groovy;
CREATE TEMPORARY FUNCTION Duplicate as 'Duplicate';
SELECT Duplicate(description) FROM sample_08 limit 5;
All OccupationsAll Occupations
Management occupationsManagement occupations
Chief executivesChief executives
General and operations managersGeneral and operations managers
LegislatorsLegislators
JSON Parsing UDF <code>compile `import org.apache.hadoop.hive.ql.exec.UDF \;
import groovy.json.JsonSlurper \;
import org.apache.hadoop.io.Text \;
public class JsonExtract extends UDF {
public int evaluate(Text a){
def jsonSlurper = new JsonSlurper() \;
def obj = jsonSlurper.parseText(a.toString())\;
return obj.val1\;
}
} ` AS GROOVY NAMED json_extract.groovy;
CREATE TEMPORARY FUNCTION json_extract as 'JsonExtract';
SELECT json_extract('{"val1": 2}') from date_dim limit 1;
2
... View more
Labels:
01-05-2016
08:07 PM
I am talking about a separate install, not Sandbox. Sandbox requires 8GB RAM. You said you want to learn, one way to learn is to install from scratch, Sandbox is great for tutorials and some admin work but to really learn the ins and outs, you need to try it out on a vanilla OS box.
... View more
01-05-2016
07:37 PM
with 4GB memory the only way you can learn Hadoop is to either install Apache Hadoop on your host machine or run a VM with 2GB of RAM and install Ambari. After installing Ambari, you can install the rest of the stack, this is a great learning experience as how I got started with Hadoop and Hortonworks.
... View more
01-05-2016
05:27 PM
Ambari will restart everything that has stale configs, for you to take advantage of both worlds, (restarting stale configs and keeping cluster up), go through each host and restart components with stale configs per node, rather than per cluster as you were doing.
... View more