четверг, 26 февраля 2015 г.
hadoop java example
MapReduce Tutorial
http://hadoop.apache.org/docs/r1.2.1/mapred_tutorial.html'
http://hadoop.apache.org/docs/current/hadoop-mapreduce-client/hadoop-mapreduce-client-core/MapReduceTutorial.html
Hadoop Basics - Creating a MapReduce Program
http://java.dzone.com/articles/hadoop-basics-creating
Writing a Hadoop MapReduce task in Java
http://www.javacodegeeks.com/2013/08/writing-a-hadoop-mapreduce-task-in-java.html
!
Hadoop: Writing and Running Your First Project
http://www.drdobbs.com/database/hadoop-writing-and-running-your-first-pr/240153197
MapReduce programming with Apache Hadoop
http://www.javaworld.com/article/2077907/open-source-tools/mapreduce-programming-with-apache-hadoop.html
http://hadoop.apache.org/docs/r1.2.1/mapred_tutorial.html'
http://hadoop.apache.org/docs/current/hadoop-mapreduce-client/hadoop-mapreduce-client-core/MapReduceTutorial.html
Hadoop Basics - Creating a MapReduce Program
http://java.dzone.com/articles/hadoop-basics-creating
Writing a Hadoop MapReduce task in Java
http://www.javacodegeeks.com/2013/08/writing-a-hadoop-mapreduce-task-in-java.html
!
Hadoop: Writing and Running Your First Project
http://www.drdobbs.com/database/hadoop-writing-and-running-your-first-pr/240153197
MapReduce programming with Apache Hadoop
http://www.javaworld.com/article/2077907/open-source-tools/mapreduce-programming-with-apache-hadoop.html
среда, 25 февраля 2015 г.
Советы, которые помогут вам начать программировать
http://lifehacker.ru/2015/02/26/nachat-programmirovat/
В ближайшие годы программирование станет ещё более важным навыком, чем сейчас. Ещё не поздно влиться в сферу людей, создающих наше будущее. Конечно, лишь в том случае, если вам это нравится. Мы выбрали 10 советов, которые помогут вам выполнить самую тяжёлую часть обучения — начать.
На сайте Business Insider можно посмотреть на список из 10 профессий, которые будут максимально востребованы в 2015 году. Неудивительно видеть, что для трёх из них нужны навыки программирования.
Akka Play java Hello World
Akka Play java Hello World
Integrating Play for Java and Akka
http://www.informit.com/articles/article.aspx?p=2228804
Harnessing New Java Web Development stack: Play 2.0, Akka, Comet
http://krishnasblog.com/2012/10/30/harnessing-new-java-web-development-frameworks-play-2-0-akka-comet/
Open source Java projects: Akka
Building distributed systems for concurrent and scalable Java applications
http://www.javaworld.com/article/2078775/scripting-jvm-languages/open-source-java-projects-akka.html?page=3
Integrating Play for Java and Akka
http://www.informit.com/articles/article.aspx?p=2228804
Harnessing New Java Web Development stack: Play 2.0, Akka, Comet
http://krishnasblog.com/2012/10/30/harnessing-new-java-web-development-frameworks-play-2-0-akka-comet/
Open source Java projects: Akka
Building distributed systems for concurrent and scalable Java applications
http://www.javaworld.com/article/2078775/scripting-jvm-languages/open-source-java-projects-akka.html?page=3
вторник, 24 февраля 2015 г.
JMockit Tutorial:Learn it today with examples
http://abhinandanmk.blogspot.com/2012/06/jmockit-tutoriallearn-it-today-with.html
JMockit is one of the many mocking frameworks available for unit testing in Java. If you have to unit test you'll invariably end up mocking objects for third party classes and for stubbing.
I assume you already know JUnit. We'll see step by step in very short tutorials that'll help you start using jmockit. I'll be trying to keep each one as crisp as possible. If you want more details.You can ask them in comments section below...
I am yet to understand some of the JMockit features completely, so please bear with me if I have not covered it in entirety.
- What is Mocking in unit Testing?
- How does JMockit support mocking?
- How to add JMockit to an eclipse project?
- How to run a test case with JMockit?
- How to mock default constructors(or constructors with no parameters) in JMockit?
- How to mock constructors with parameters (or those that take arguments) ?
- How to mock static initialization blocks in JMockit?
- How to mock public methods in JMockit
- How to mock private methods in JMockit?
- How to mock static methods in JMockit?
- How to invoke or test private methods in JMockit?
- How to throw exceptions in an Expectations block?
- Some more JMockit utilities before signing off.
How to mock constructors in JMockit?
Consider the code below:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
| /************************* Person.java ****************/ public class Person { private String name; public Person(){ name = "Default Abhi" ; } public String getName() { return name; } public void setName(String name) { this .name = name; } } /******************* PersonTestConstructor.java ***********/ public class PersonTestConstructor { @Test public void testGetName() { new MockUp<Person>() { @Mock public void $init() { //Dont assign name variable at all //Leave it null } }; Person p = new Person(); String name = p.getName(); assertNull( "Name of person is null" ,name); } } |
Remember the to put the @Mock annotation above. I have spent hours trying to debug only to find out that I forgot.
Подписаться на:
Сообщения (Atom)