Skip to content

Commit

Permalink
stub method for future work; example of load factor to be configured …
Browse files Browse the repository at this point in the history
…via YARN resources allocations
  • Loading branch information
Hokan-Ashir committed Jul 21, 2016
1 parent f51e366 commit bfc20de
Showing 1 changed file with 18 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,15 @@
import org.springframework.yarn.annotation.OnContainerStart;
import org.springframework.yarn.annotation.YarnComponent;

import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import java.util.Random;

@YarnComponent
public class HelloPojo {

private static final int NUMBER_OF_GENERATED_RANDOM_DIGITS = 100000;
private static final Log log = LogFactory.getLog(HelloPojo.class);

@Autowired
Expand All @@ -27,6 +33,18 @@ public void publicVoidNoArgsMethod() throws Exception {
log.info(s);
}
shell.close();

// createAndSortDigits(NUMBER_OF_GENERATED_RANDOM_DIGITS);
}

private void createAndSortDigits(int numberOfDigits) {
Random random = new Random();
List<Integer> list = new ArrayList<Integer>();
for (int i = 0; i < numberOfDigits; i++) {
list.add(random.nextInt());
}

Collections.sort(list);
}

}

0 comments on commit bfc20de

Please sign in to comment.