View Hadoop
##MapReduce #Word Count
#inputmap.txt
A long time ago
in a galaxy far
far away
View Spark
/***************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
#Master WTJavaTask
Aspire@Acer MINGW64 ~
$ java -version
java version "1.8.0_102"
Java(TM) SE Runtime Environment (build 1.8.0_102-b14)
Java HotSpot(TM) 64-Bit Server VM (build 25.102-b14, mixed mode)
View PySpark
./spark-1.6.1/bin/pyspark --conf "spark.mongodb.input.uri=mongodb://127.0.0.1/nasa.eva?readPreference=primaryPreferred" \
--conf "spark.mongodb.output.uri=mongodb://127.0.0.1/nasa.astronautTotals" \
--packages org.mongodb.spark:mongo-spark-connector_2.11:2.0.0
# SparkContext available as sc, HiveContext available as sqlContext.
>>> dir(sc)
['PACKAGE_EXTENSIONS', '__class__', '__delattr__', '__dict__', '__doc__', '__enter__', '__exit__', '__format__', '__getattribute__', '__getnewargs__', '__hash__', '__init__', '__module__', '__new__', '__reduce__', '__reduce_ex__', '__repr__', '__setattr__', '__sizeof__', '__str__', '__subclasshook__', '__weakref__', '_accumulatorServer', '_active_spark_context', '_batchSize', '_callsite', '_checkpointFile', '_conf', '_dictToJavaMap', '_do_init', '_ensure_initialized', '_gateway', '_getJavaStorageLevel', '_initialize_context', '_javaAccumulator', '_jsc', '_jvm', '_lock', '_next_accum_id', '_pickled_broadcast_vars', '_python_includes', '_temp_dir'
View MongoDB
mongod --version
#MongoDB Default Directory: "/<root>/db/data" viz. "/c/db/data" #OR "<Root>:\db\data" viz. "C:\db\data"
rm -rf "/e/WT" #OR rm -rf "E:\WT"
mkdir -p "/e/WT" #OR mkdir -p "E:\WT"
#MongoDB Server #runserver #mongod -dbpath <Directory>/WT --storageEngine <storage engine>
View SQL Server.sql
--AdventureWorksLT sample database
/*****************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
--1-Introduction to T-SQL
--Demo 1-Select
View Program.cs
// CS 4
/*
1. Dynamic Binding
2. Optional Parameters
3. Named Arguments
4. Variance - Covariance and Contravariance
5. Tuple
*/
using System;
View Program.java
// Java 8
/*
1. Lambda Expression
2. Method References
3. Default Interface Methods
4. Static Interface Methods
5. Functional Interfaces
6. Stream
*/
View Program.cs
// CS 5
/*
async
await
*/
// async
// The async is the modifier used to mark a method as asynchronous
using System;
View Program.cs
// CS 3
/*
1. Implicitly Typed Local Variables
2. Implicitly Typed Arrays
3. Query Expressions (LINQ)
4. Anonymous Types
5. Object and Collection Initializers
6. Extension Methods
7. Lambda Expressions
8. Expression Trees
View Program.cs
// CS 2
/*
1. Generics
2. Nullable types
3. Iterators
4. yield Statement
5. Partial Classes/Structs/Interfaces
6. Anonymous methods
7. The :: operator (Namespace Alias Qualifier)
8. Static Classes