Category Archives: Big Data

Basic hadoop configuration files

$ cd $HADOOP_HOME/etc/hadoop Edit core-site.xml <configuration> <property> <name>fs.default.name</name> <value>hdfs://localhost:9000</value> </property> </configuration> Edit hdfs-site.xml <configuration> <property> <name>dfs.replication</name> <value>1</value> </property> <property> <name>dfs.name.dir</name> <value>file:///home/hadoop/hadoopdata/hdfs/namenode</value> </property> <property> <name>dfs.data.dir</name> <value>file:///home/hadoop/hadoopdata/hdfs/datanode</value> </property> </configuration> Edit mapred-site.xml <configuration> <property> <name>mapreduce.framework.name</name> <value>yarn</value> </property> </configuration>   Edit yarn-site.xml <configuration> <property> … Continue reading

Posted in Hadoop

First steps in MongoDB

Step1. Installation. The mongodb-org package does not exist within the default repositories for CentOS. However, MongoDB maintains a dedicated repository. Let’s add it to our server. sudo vi /etc/yum.repos.d/mongodb-org.repo /etc/yum.repos.d/mongodb-org.repo [mongodb-org-3.2] name=MongoDB Repository baseurl=https://repo.mongodb.org/yum/redhat/$releasever/mongodb-org/3.2/x86_64/ gpgcheck=1 enabled=1 gpgkey=https://www.mongodb.org/static/pgp/server-3.2.asc yum repolist sudo … Continue reading

Posted in MongoDB | Tagged , ,

SQL cheat list

Image | Posted on by

1. COMPUTING RECENCY, FREQUENCY, MONETARY VALUE

# Load text file into local variable called ‘data’ > data = read.delim(file = ‘e:/courses/Big_data/R/Marketinganalzse/purchases.txt’, header = FALSE, sep=’\t’, dec=’.’) # Display what has been loaded. > head(data) V1 V2 V3 1 760 25 2009-11-06 2 860 50 2012-09-28 3 … Continue reading

Posted in Marketing analyze

Creating first and simple table in HBase

A new HBase table is able to create using HBase shell or Java API. Create table in HBase:  =>  create ‘tablename’, {NAME => ‘columnname’}   ================ ! Here we are creating table and specifying the name of table and defining … Continue reading

Posted in Hadoop, HBase | Leave a comment

R log Function

R log Function log() function computes natural logarithms (Ln) for a number or vector. log10 computes common logarithms (Lg).log2 computes binary logarithms (Log2). log(x,b) computes logarithms with base b. >log(5)     #ln5 [1] 1.609438   >log10(5)    #lg5 [1] 0.69897   >log2(5)    … Continue reading

Posted in Data analyze, R