Instantly share code, notes, and snippets.

View mapred-site.xml
<configuration>
<property>
<name>mapreduce.framework.name</name>
<value>yarn</value>
</property>
<property>
<name>yarn.app.mapreduce.am.env</name>
<value>HADOOP_MAPRED_HOME=${HADOOP_HOME}</value>
</property>
<property>
View yarn-site.xml
<configuration>
<property>
<name>yarn.nodemanager.aux-services</name>
<value>mapreduce_shuffle</value>
</property>
<property>
<name>yarn.nodemanager.aux-services.mapreduce_shuffle.class</name>
<value>org.apache.hadoop.mapred.ShuffleHandler</value>
</property>
<property>
View core-site.xml
<configuration>
<property>
<name>fs.default.name</name>
<value>hdfs://master:9000</value>
</property>
</configuration>
View hdfs-site.xml
<configuration>
<property>
<name>dfs.namenode.name.dir</name>
<value>/usr/local/hadoop/data/nameNode</value>
</property>
<property>
<name>dfs.datanode.data.dir</name>
<value>/usr/local/hadoop/data/dataNode</value>
</property>
<property>
View style.css
.change-btn{
position: absolute;
bottom: 20px;
font-size: 20px;
cursor:pointer;
display: none;
}
.change-btn:hover{
transition: all 0.5s ease-out;
text-decoration: underline;
View index.html
<div class="change-btn">
Choose a new interest
</div>
View script.js
function newimage(keyword){
if(!ACCESS_KEY){
alert("Please update your access key");
return;
}
var url = `https://api.unsplash.com/search/photos?query=${keyword}&per_page=20&orientation=landscape&client_id=${ACCESS_KEY}`;
$.get(url,function(data){
var picture = data.results[0];
var picture_url = picture.urls.raw;
View script.js
$('.greeting').html(`Hello <span class="stored-name">${username}</span>.`);
var picture_url = getCookie('picture');
if(!picture_url){
newimage(interest);
picture_url = getCookie('picture');
}
$('body').css('background-image',`url(${picture_url})`);