<commit_before>package com.neverwinterdp.hadoop.yarn.app;

import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.yarn.conf.YarnConfiguration;
import org.apache.hadoop.yarn.server.MiniYARNCluster;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;

import com.neverwinterdp.hadoop.AbstractMiniClusterUnitTest;
import com.neverwinterdp.hadoop.yarn.app.ipc.IPCService;
import com.neverwinterdp.util.JSONSerializer;

public class AppClientUnitTest extends AbstractMiniClusterUnitTest {
  static {
    System.setProperty("java.net.preferIPv4Stack", "true") ;
  }
  
  MiniYARNCluster miniYarnCluster ;

  @Before
  public void setup() throws Exception {
    YarnConfiguration yarnConf = new YarnConfiguration() ;
    yarnConf.set("io.serializations", "org.apache.hadoop.io.serializer.JavaSerialization");
    miniYarnCluster = createMiniYARNCluster(yarnConf, 1);
    Configuration conf = miniYarnCluster.getConfig() ;
  }

  @After
  public void teardown() throws Exception {
    miniYarnCluster.stop();
    miniYarnCluster.close();
  }

  @Test
  public void testAppClient() throws Exception {
    String[] args = { 
      "--mini-cluster-env",
      "--app-name", "HelloYarn",
      "--app-container-manager", "com.neverwinterdp.hadoop.yarn.sample.HelloAppContainerManger",
      "--app-rpc-port", "63200" ,
      "--app-history-server-address", "http://127.0.0.1:8080/yarn-app/history",
      "--conf:yarn.resourcemanager.scheduler.address=0.0.0.0:8030"
    } ;
    AppClient appClient = new AppClient() ;<commit_msg>Changing port to help pass running on Jenkins<commit_after>package com.neverwinterdp.hadoop.yarn.app;

import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.yarn.conf.YarnConfiguration;
import org.apache.hadoop.yarn.server.MiniYARNCluster;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;

import com.neverwinterdp.hadoop.AbstractMiniClusterUnitTest;
import com.neverwinterdp.hadoop.yarn.app.ipc.IPCService;
import com.neverwinterdp.util.JSONSerializer;

public class AppClientUnitTest extends AbstractMiniClusterUnitTest {
  static {
    System.setProperty("java.net.preferIPv4Stack", "true") ;
  }
  
  MiniYARNCluster miniYarnCluster ;

  @Before
  public void setup() throws Exception {
    YarnConfiguration yarnConf = new YarnConfiguration() ;
    yarnConf.set("io.serializations", "org.apache.hadoop.io.serializer.JavaSerialization");
    miniYarnCluster = createMiniYARNCluster(yarnConf, 1);
    Configuration conf = miniYarnCluster.getConfig() ;
  }

  @After
  public void teardown() throws Exception {
    miniYarnCluster.stop();
    miniYarnCluster.close();
  }

  @Test
  public void testAppClient() throws Exception {
    String[] args = { 
      "--mini-cluster-env",
      "--app-name", "HelloYarn",
      "--app-container-manager", "com.neverwinterdp.hadoop.yarn.sample.HelloAppContainerManger",
      "--app-rpc-port", "63200" ,
      "--app-history-server-address", "http://127.0.0.1:9090/yarn-app/history",
      "--conf:yarn.resourcemanager.scheduler.address=0.0.0.0:8030"
    } ;
    AppClient appClient = new AppClient() ;
{'fraction_non_alphanumeric': 0.12755102040816327, 'fraction_numerical': 0.01594387755102041, 'mean_word_length': 4.210963455149502, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 4, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2658072', 'n_tokens_mistral': 1048, 'n_tokens_neox': 1011, 'n_words': 163}