This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<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> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<configuration> | |
<property> | |
<name>fs.default.name</name> | |
<value>hdfs://master:9000</value> | |
</property> | |
</configuration> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<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> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.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; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div class="change-btn"> | |
Choose a new interest | |
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$('.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})`); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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_url = data.results[0].urls.raw; | |
setCookie("picture",picture_url,0.5); | |
$('body').css('background-image',`url(${picture_url})`); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$('.interest').keypress(function(e) { | |
if(e.which == 13) { | |
var interest = e.target.value; | |
if(!interest) return; | |
newimage(interest); | |
if(!getCookie('picture')) return; | |
$('.interest').fadeOut(function(){ | |
$('.greeting').html(`Hello ${username}.`); | |
$('.greeting').fadeIn(function(){ | |
setCookie('interest', interest,365); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var username = getCookie('username'); | |
//check cookie | |
if(username){ | |
$('.greeting').css('display','inline-block'); | |
$('.user-name').css('display','none'); | |
var interest = getCookie('interest'); | |
if(interest){ | |
$('.interest').css('display','none'); | |
$('.interest-text').html(interest); |