text:
package com.cloudera.circus.test;

import org.apache.hadoop.fs.FileSystem;
import org.apache.hadoop.fs.Path;
import org.apache.hadoop.fs.permission.FsPermission;
import org.apache.hadoop.hdfs.MiniDFSCluster;
import org.apache.hadoop.mapred.JobConf;
import org.apache.hadoop.mapred.MiniMRCluster;
import org.apache.hadoop.security.UserGroupInformation;
import org.apache.log4j.LogManager;
import org.apache.log4j.PropertyConfigurator;
import org.mortbay.jetty.Server;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.testng.Assert;
import org.testng.IInvokedMethod;
import org.testng.IInvokedMethodListener;
import org.testng.ITestNGMethod;
import org.testng.ITestResult;
import org.testng.annotations.AfterSuite;
import org.testng.annotations.BeforeSuite;
import org.testng.annotations.Listeners;

import java.io.File;
import java.io.FileReader;
import java.io.IOException;
import java.net.InetAddress;
import java.net.MalformedURLException;
import java.net.ServerSocket;
import java.net.URL;
import java.security.PrivilegedExceptionAction;
import java.text.MessageFormat;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.Properties;

/**
 * Base TestNG class with conveninece functionaly for tests using:
 *

 *
Java System properties setting

 *
Local directories

 *
A Hadoop cluster

 *
Servlets/Filters

 *

 *

 * Java System properties setting:
 *

 * To help setting Java System Properties for test cases when using Maven and
 * IDEs (ie Eclipse, IntelliJ) in a simple an consistent way, XTest scans the
 * current directory and the parents for a test.properties file
 * and if present, loads it and sets all its properties as Java System
 * properties.
 *

 * This loading is done once per test JVM, when the XTest class is loaded.
 *

 * The Java System property test.properties can be used to make
 * XTest to look for a file name with a different name than
 * test.properties (this is useful for having different test
 * configurations).
 *

 * Local Test directories:
 *

 * The {@link TestDir} annotation must be used in the test method.
 *

 * All test methods of XTest sub-classes annotated with
 * {@link TestDir} will have a private local directory for its tests.
 *

 * The base directory for all the test directories is, by default,
 * target/testdir. The base directory can be set using the
 * Java System property test.dir. This property must be set to
 * an absolute directory.
 *

 * Hadoop cluster:
 *

 * The {@link TestHadoop} annotation must be used in the test method.
 *

 * The XTest class simplifies writing test cases that require a Hadoop
 * cluster (it supports both an embedded Hadoop test minicluster and an real Hadoop
 * cluster).
 *

 * If the Java System property test.hadoop.minicluster is set
 * to true a Hadoop test minicluster will be started.
 *

 * A single Hadoop test minicluster will be started per test JVM. If all
 * test run in the same JVM a single Hadoop test minicluster will be used.
 *

 * If the Java System property test.hadoop.minicluster is set
 * to false a real Hadoop cluster will be used. The URI for the
 * JobTracker and the NameNode must be specified using the corresponding Hadoop
 * configuration properties as Java System properties (use the
 * test.properties file describe above).
 *

 * The {@link #getHadoopConf} returns a Hadoop JobConf preconfigured to connect
 * to the Hadoop test minicluster or the Hadoop cluster information.
 *

 * Servlets/Filters:
 *

 * The {@link TestServlet} annotation must be used in the test method.
 *

 * The XTest class simplifies writing test cases that require Servlets
 * and Servlet Filters .
 *

 * The {@link #getJettyServer()} returns a ready to configure Jetty
 * servlet-container. After registering contexts, servlets, filters the the Jetty
 * server must be started (getJettyServer.start(). The Jetty server
 * is automatically stopped at the end of the test method invocation.
 *

 * Use the {@link #getJettyURL()} to obtain the base URL (schema://host:port)
 * of the Jetty server.
 */
@Listeners(XTest.TestMethodListener.class)
public abstract class XTest {
  protected static Logger LOG;

  public static final String TEST_PROPERTIES_PROP = "test.properties";
  public static final String TEST_DIR_PROP = "test.dir";
  public static final String TEST_WAITFOR_RATIO_PROP = "test.waitfor.ratio";

  //need to do this because it seems that TestNG starts concurrent tests before the @BeforeSuite run completes
  private static float WAITFOR_RATIO_DEFAULT = Float.parseFloat(System.getProperty(TEST_WAITFOR_RATIO_PROP, "1"));

  static String TEST_DIR_ROOT;

  private static void delete(File file) throws IOException {
    if (file.getAbsolutePath().length() < 5) {
      throw new IllegalArgumentException(
        MessageFormat.format("Path [{0}] is too short, not deleting", file.getAbsolutePath()));
    }
    if (file.exists()) {
      if (file.isDirectory()) {
        File[] children = file.listFiles();
        if (children != null) {
          for (File child : children) {
            delete(child);
          }
        }
      }
      if (!file.delete()) {
        throw new RuntimeException(MessageFormat.format("Could not delete path [{0}]", file.getAbsolutePath()));
      }
    }
  }

  /**
   * Initializes the XTest context. This method is automatically called by TestNG.
   */
  @BeforeSuite
  public void testsSetup() {
    try {
      String testFileName = System.getProperty(TEST_PROPERTIES_PROP, "test.properties");
      File currentDir = new File(testFileName).getAbsoluteFile().getParentFile();
      File testFile = new File(currentDir, testFileName);
      while (currentDir != null && !testFile.exists()) {
        testFile = new File(testFile.getAbsoluteFile().getParentFile().getParentFile(), testFileName);
        currentDir = currentDir.getParentFile();
        if (currentDir != null) {
          testFile = new File(currentDir, testFileName);
        }
      }

      if (testFile.exists()) {
        System.out.println();
        System.out.println(">>> " + TEST_PROPERTIES_PROP + " : " + testFile.getAbsolutePath());
        Properties testProperties = new Properties();
        testProperties.load(new FileReader(testFile));
        for (Map.Entry entry : testProperties.entrySet()) {
          if (!System.getProperties().containsKey(entry.getKey())) {
            System.setProperty((String) entry.getKey(), (String) entry.getValue());
          }
        }
      }
      else if (System.getProperty(TEST_PROPERTIES_PROP) != null) {
        System.err.println(MessageFormat.format("Specified test.properties file does not exist [{0}]",
                                                System.getProperty(TEST_PROPERTIES_PROP)));
        System.exit(-1);

      }
      else {
        System.out.println(">>> " + TEST_PROPERTIES_PROP + " : <NONE>");
      }

      TEST_DIR_ROOT = System.getProperty(TEST_DIR_PROP, new File("target").getAbsolutePath());
      if (!TEST_DIR_ROOT.startsWith("/")) {
        System.err.println(MessageFormat.format("System property [{0}]=[{1}] must be set to an absolute path",
                                                TEST_DIR_PROP, TEST_DIR_ROOT));
        System.exit(-1);
      }
      else if (TEST_DIR_ROOT.length() < 4) {
        System.err.println(MessageFormat.format("System property [{0}]=[{1}] must be at least 4 chars",
                                                TEST_DIR_PROP, TEST_DIR_ROOT));
        System.exit(-1);
      }

      TEST_DIR_ROOT = new File(TEST_DIR_ROOT, "testdir").getAbsolutePath();
      System.setProperty(TEST_DIR_PROP, TEST_DIR_ROOT);

      WAITFOR_RATIO_DEFAULT = Float.parseFloat(System.getProperty(TEST_WAITFOR_RATIO_PROP, "1"));
      // for the first testcase
      waitForRatio = WAITFOR_RATIO_DEFAULT;

      File dir = new File(TEST_DIR_ROOT);
      delete(dir);
      if (!dir.mkdirs()) {
        System.err.println(MessageFormat.format("Could not create test dir [{0}]", TEST_DIR_ROOT));
        System.exit(-1);
      }

      System.setProperty("test.circus", "true");

      System.out.println(">>> " + TEST_DIR_PROP + "        : " + System.getProperty(TEST_DIR_PROP));

      String log4jConfig = System.getProperty("test.log", "null");
      System.out.println(">>> test.log        : " + log4jConfig);
      if (log4jConfig.equals("null")) {
        log4jConfig = "test-null-log4j.properties";
      }
      else if (log4jConfig.equals("console")) {
        log4jConfig = "test-console-log4j.properties";
      }
      else if (log4jConfig.equals("file")) {
        log4jConfig = "test-file-log4j.properties";
        System.out.println(">>> test log file   : " + System.getProperty(TEST_DIR_PROP) + "/test.log");
      }
      else {
        System.out.println(">>> test log4j conf : " + log4jConfig);
      }
      URL log4jConfigURL = getClass().getClassLoader().getResource(log4jConfig);
      if (log4jConfigURL != null) {
        PropertyConfigurator.configure(log4jConfigURL);
      }
      else {
        PropertyConfigurator.configure(log4jConfig);
      }
      System.out.println();
      sleep(100);

      LOG = LoggerFactory.getLogger("test");
      LOG.info("TESTS START");
    }
    catch (IOException ex) {
      throw new RuntimeException(ex);
    }
  }

  private static final Object HADOOP_LOCK = new Object();
  private static JobConf HADOOP_CONF = null;
  private static MiniDFSCluster DFS_CLUSTER = null;
  private static MiniMRCluster MR_CLUSTER = null;

  /**
   * Destroys the XTest context. This method is automatically called by TestNG.
   */
  @AfterSuite
  public void testsDestroy() {
    if (MR_CLUSTER != null) {
      MR_CLUSTER.shutdown();
    }
    if (DFS_CLUSTER != null) {
      DFS_CLUSTER.shutdown();
    }
    LogManager.shutdown();
  }

  private static ThreadLocal<File> TEST_DIR_TL = new InheritableThreadLocal<File>();

  private static ThreadLocal<JobConf> TEST_HADOOP_TL = new InheritableThreadLocal<JobConf>();

  private static ThreadLocal<Path> TEST_DIR_HADOOP_TL = new InheritableThreadLocal<Path>();

  private static ThreadLocal<Server> TEST_SERVLET_TL = new InheritableThreadLocal<Server>();

  private float waitForRatio = WAITFOR_RATIO_DEFAULT;

  /**
   * Returns the local test directory for the current test, only available when the
   * test method has been annotated with {@link TestDir}.
   *
   * @return the test directory for the current test. It is an full/absolute
   * File.
   */
  protected File getTestDir() {
    File testDir = TEST_DIR_TL.get();
    if (testDir == null) {
      throw new IllegalStateException("This test does not use @TestDir");
    }
    return testDir;
  }

  /**
   * Returns the HDFS test directory for the current test, only available when the
   * test method has been annotated with {@link TestHadoop}.
   *
   * @return the HDFS test directory for the current test. It is an full/absolute
   * Path.
   */
  protected Path getHadoopTestDir() {
    Path testDir = TEST_DIR_HADOOP_TL.get();
    if (testDir == null) {
      throw new IllegalStateException("This test does not use @TestHadoop");
    }
    return testDir;
  }

  /**
   * Returns a Hadoop JobConf preconfigured with the Hadoop cluster
   * settings for testing. This configuration is only available whe the test
   * method has been annotated with {@link TestHadoop}. Refer to {@link XTest}
   * header for details)
   *
   * @return the Hadoop JobConf preconfigured with the Hadoop cluster
   * settings for testing
   */
  protected JobConf getHadoopConf() {
    JobConf jobConf = TEST_HADOOP_TL.get();
    if (jobConf == null) {
      throw new IllegalStateException("This test does not use @TestHadoop");
    }
    return new JobConf(jobConf);
  }

  /**
   * Returns a Jetty server ready to be configured and the started. This server
   * is only available whe the test method has been annotated with
   * {@link TestServlet}. Refer to {@link XTest} header for details.
   *

   * Once configured, the Jetty server should be started. The server will be
   * automatically stopped when the test method ends.
   *
   * @return a Jetty server ready to be configured and the started.
   */
  protected Server getJettyServer() {
    Server server = TEST_SERVLET_TL.get();
    if (server == null) {
      throw new IllegalStateException("This test does not use @TestServlet");
    }
    return server;
  }

  /**
   * Returns the base URL (SCHEMA://HOST:PORT) of the test Jetty server
   * (see {@link #getJettyServer()}) once started.
   *
   * @return the base URL (SCHEMA://HOST:PORT) of the test Jetty server.
   */
  protected URL getJettyURL() {
    Server server = TEST_SERVLET_TL.get();
    if (server == null) {
      throw new IllegalStateException("This test does not use @TestServlet");
    }
    try {
      return new URL("http://" + server.getConnectors()[0].getHost() + ":" + server.getConnectors()[0].getPort());
    }
    catch (MalformedURLException ex) {
      throw new RuntimeException("It should never happen, " + ex.getMessage(), ex);
    }
  }

  /**
   * Sets the 'wait for ratio' used in the {@link #sleep(long)},
   * {@link #waitFor(int, Predicate)} and
   * {@link #waitFor(int, boolean, Predicate)} method for the current
   * test class.
   *

   * This is useful when running tests in slow machine for tests
   * that are time sensitive.
   *
   * @param ratio the 'wait for ratio' to set.
   */
  protected void setWaitForRatio(float ratio) {
    waitForRatio = ratio;
  }

  /*
   * Returns the 'wait for ratio' used in the {@link #sleep(long)},
   * {@link #waitFor(int, Predicate)} and
   * {@link #waitFor(int, boolean, Predicate)} methods for the current
   * test class.
   *

   * This is useful when running tests in slow machine for tests
   * that are time sensitive.
   *

   * The default value is obtained from the Java System property
   * test.wait.for.ratio which defaults to 1.
   *
   * @return the 'wait for ratio' for the current test class.
   */
  protected float getWaitForRatio() {
    return waitForRatio;
  }

  private static String getTestUniqueName(ITestNGMethod testMethod) {
    String className = testMethod.getRealClass().getSimpleName();
    String methodName = testMethod.getMethodName();
    int testCount = testMethod.getCurrentInvocationCount();
    return className + "-" + methodName + "-" + Integer.toString(testCount);
  }

  private static File createTestCaseDir(ITestNGMethod testMethod) {
    File dir = new File(TEST_DIR_ROOT);
    dir = new File(dir, getTestUniqueName(testMethod));
    dir = dir.getAbsoluteFile();
    try {
      delete(dir);
    }
    catch (IOException ex) {
      throw new RuntimeException(MessageFormat.format("Could not delete test dir[{0}], {1}",
                                                      dir, ex.getMessage()), ex);
    }
    if (!dir.mkdirs()) {
      throw new RuntimeException(MessageFormat.format("Could not create test dir[{0}]", dir));
    }
    return dir;
  }

  /**
   * A predicate 'closure' used by the {@link #waitFor(int, Predicate)} and
   * {@link #waitFor(int, boolean, Predicate)} methods.
   */
  public static interface Predicate {

    /**
     * Perform a predicate evaluation.
     *
     * @return the boolean result of the evaluation.
     * @throws Exception thrown if the predicate evaluation could not evaluate.
     */
    public boolean evaluate() throws Exception;

  }

  /**
   * Makes the current thread sleep for the specified number of milliseconds.
   *

   * The sleep time is multiplied by the {@link #getWaitForRatio()}.
   *
   * @param time the number of milliseconds to sleep.
   */
  protected void sleep(long time) {
    try {
      Thread.sleep((long) (getWaitForRatio() * time));
    }
    catch (InterruptedException ex) {
      LOG.error("Sleep interrupted, {}", ex, ex);
    }
  }

  /**
   * Waits up to the specified timeout for the given {@link Predicate} to
   * become true, failing the test if the timeout is reached
   * and the Predicate is still false.
   *

   * The timeout time is multiplied by the {@link #getWaitForRatio()}.
   *
   * @param timeout the timeout in milliseconds to wait for the predicate.
   * @param predicate the predicate ot evaluate.
   * @return the effective wait, in milli-seconds until the predicate become
   * true.
   */
  protected long waitFor(int timeout, Predicate predicate) {
    return waitFor(timeout, false, predicate);
  }

  /**
   * Waits up to the specified timeout for the given {@link Predicate} to
   * become true.
   *

   * The timeout time is multiplied by the {@link #getWaitForRatio()}.
   *
   * @param timeout the timeout in milliseconds to wait for the predicate.
   * @boolean failIfTimeout indicates if the test should be failed if the
   * predicate times out.
   * @param predicate the predicate ot evaluate.
   * @return the effective wait, in milli-seconds until the predicate become
   * true or -1 if the predicate did not evaluate
   * to true.
   */
   protected long waitFor(int timeout, boolean failIfTimeout, Predicate predicate) {
    long started = System.currentTimeMillis();
    long mustEnd = System.currentTimeMillis() + (long) (getWaitForRatio() * timeout);
    long lastEcho = 0;
    try {
      long waiting = mustEnd - System.currentTimeMillis();
      LOG.info("Waiting up to [{}] msec", waiting);
      boolean eval;
      while (!(eval = predicate.evaluate()) && System.currentTimeMillis() < mustEnd) {
        if ((System.currentTimeMillis() - lastEcho) > 5000) {
          waiting = mustEnd - System.currentTimeMillis();
          LOG.info("Waiting up to [{}] msec", waiting);
          lastEcho = System.currentTimeMillis();
        }
        Thread.sleep(100);
      }
      if (!eval) {
        if (failIfTimeout) {
          Assert.fail(MessageFormat.format("Waiting timed out after [{0}] msec", timeout));
        }
        else {
          LOG.info("Waiting timed out after [{}] msec", timeout);
        }
      }
      return (eval) ? System.currentTimeMillis() - started : -1;
    }
    catch (Exception ex) {
      throw new RuntimeException(ex);
    }
  }

  public static final String HADOOP_MINICLUSTER = "test.hadoop.minicluster";
  public static final String HADOOP_PROXYUSER = "test.hadoop.proxyuser";
  public static final String HADOOP_PROXYUSER_HOSTS = "test.hadoop.proxyuser.hosts";
  public static final String HADOOP_PROXYUSER_GROUPS = "test.hadoop.proxyuser.groups";

  public static final String HADOOP_USER_PREFIX = "test.hadoop.user.";

  /**
   * Returns a valid Hadoop proxyuser for the Hadoop cluster.
   *

   * The user is read from the Java System property
   * test.hadoop.proxyuser which defaults to the current user
   * (java System property user.name).
   *

   * This property should be set in the test.properties file.
   *

   * When running Hadoop minicluster it is used to configure the Hadoop minicluster.
   *

   * When using an external Hadoop cluster, it is expected this property is set to
   * a valid proxy user.
   *
   * @return a valid Hadoop proxyuser for the Hadoop cluster.
   */
  protected static String getHadoopProxyUser() {
    return System.getProperty(HADOOP_PROXYUSER, System.getProperty("user.name"));
  }

  /**
   * Returns the hosts for the Hadoop proxyuser settings.
   *

   * The hosts are read from the Java System property
   * test.hadoop.proxyuser.hosts which defaults to *.
   *

   * This property should be set in the test.properties file.
   *

   * This property is ONLY used when running Hadoop minicluster, it is used to
   * configure the Hadoop minicluster.
   *

   * When using an external Hadoop cluster this property is ignored.
   *
   * @return the hosts for the Hadoop proxyuser settings.
   */
  protected static String getHadoopProxyUserHosts() {
    return System.getProperty(HADOOP_PROXYUSER_HOSTS, "*");
  }

  /**
   * Returns the groups for the Hadoop proxyuser settings.
   *

   * The hosts are read from the Java System property
   * test.hadoop.proxyuser.groups which defaults to *.
   *

   * This property should be set in the test.properties file.
   *

   * This property is ONLY used when running Hadoop minicluster, it is used to
   * configure the Hadoop minicluster.
   *

   * When using an external Hadoop cluster this property is ignored.
   *
   * @return the groups for the Hadoop proxyuser settings.
   */
  protected static String getHadoopProxyUserGroups() {
    return System.getProperty(HADOOP_PROXYUSER_GROUPS, "*");
  }

  /**
   * Returns the Hadoop users to be used for tests. These users are defined
   * in the test.properties file in properties of the form
   * test.hadoop.user.#USER#=#GROUP1#,#GROUP2#,....
   *

   * These properties are used to configure the Hadoop minicluster user/group
   * information.
   *

   * When using an external Hadoop cluster these properties should match the
   * user/groups settings in the cluster.
   *
   * @return the Hadoop users used for testing.
   */
  protected static String[] getHadoopUsers() {
    List<String> users = new ArrayList<String>();
    for (String name : System.getProperties().stringPropertyNames()) {
      if (name.startsWith(HADOOP_USER_PREFIX)) {
        users.add(name.substring(HADOOP_USER_PREFIX.length()));
      }
    }
    return users.toArray(new String[users.size()]);
  }

  /**
   * Returns the groups a Hadoop user belongs to during tests. These users/groups
   * are defined in the test.properties file in properties of the
   * form test.hadoop.user.#USER#=#GROUP1#,#GROUP2#,....
   *

   * These properties are used to configure the Hadoop minicluster user/group
   * information.
   *

   * When using an external Hadoop cluster these properties should match the
   * user/groups settings in the cluster.
   *
   * @return the groups of Hadoop users used for testing.
   */
  protected static String[] getHadoopUserGroups(String user) {
    String groups = System.getProperty(HADOOP_USER_PREFIX + user);
    return (groups != null) ? groups.split(",") : new String[0];
  }

  /**
   * Used by {@link XTest} to wire itself to the TestNG framework.
   */
  public static class TestMethodListener implements IInvokedMethodListener {
    File testDir;

    @Override
    public void beforeInvocation(IInvokedMethod iInvokedMethod, ITestResult iTestResult) {
      TestDir td = iInvokedMethod.getTestMethod().getMethod().getAnnotation(TestDir.class);
      if (td != null) {
        testDir = createTestCaseDir(iInvokedMethod.getTestMethod());
      }
      else {
        testDir = null;
      }
      TEST_DIR_TL.set(testDir);

      TestHadoop th = iInvokedMethod.getTestMethod().getMethod().getAnnotation(TestHadoop.class);
      if (th != null) {
        synchronized (HADOOP_LOCK) {
          if (HADOOP_CONF == null) {
            JobConf conf = new JobConf();
            for (String name : System.getProperties().stringPropertyNames()) {
              conf.set(name, System.getProperty(name));
            }
            if (Boolean.parseBoolean(System.getProperty(HADOOP_MINICLUSTER, "true"))) {
              try {
                HADOOP_CONF = setUpEmbeddedHadoop(conf);
              }
              catch (Exception ex) {
                throw new RuntimeException(ex);
              }
            }
            else {
              HADOOP_CONF = conf;
            }
          }
          TEST_HADOOP_TL.set(HADOOP_CONF);

          Path testDir = new Path("./" + TEST_DIR_ROOT, getTestUniqueName(iInvokedMethod.getTestMethod()));
          try {
            // currentUser
            FileSystem fs = FileSystem.get(HADOOP_CONF);
            fs.delete(testDir, true);
            fs.mkdirs(testDir);

            // proxusers
            for (String user : getHadoopUsers()) {
              createHadoopTempDir(user, testDir);
            }
          }
          catch (Exception ex) {
            throw new RuntimeException(ex);
          }
          TEST_DIR_HADOOP_TL.set(testDir);
        }
      }

      TestServlet ts = iInvokedMethod.getTestMethod().getMethod().getAnnotation(TestServlet.class);
      if (ts != null) {
        TEST_SERVLET_TL.set(createServer());
      }
    }

    private void createHadoopTempDir(String user, final Path testDir) throws Exception {
      UserGroupInformation ugi = UserGroupInformation.createProxyUser(user,
                                                                      UserGroupInformation.getCurrentUser());
      ugi.doAs(new PrivilegedExceptionAction<Void>() {
        @Override
        public Void run() throws Exception {
          FileSystem fs = FileSystem.get(HADOOP_CONF);
          fs.delete(testDir, true);
          fs.mkdirs(testDir);
          return null;
        }
      });
    }

    @Override
    public void afterInvocation(IInvokedMethod iInvokedMethod, ITestResult iTestResult) {
      TEST_DIR_TL.remove();
      TEST_HADOOP_TL.remove();
      TEST_DIR_HADOOP_TL.remove();
      if (TEST_SERVLET_TL.get() != null) {
        if (TEST_SERVLET_TL.get().isRunning()) {
          try {
            TEST_SERVLET_TL.get().stop();
          }
          catch (Exception ex) {
            throw new RuntimeException("Could not stop embedded servlet container, " + ex.getMessage(), ex);
          }
        }
        TEST_SERVLET_TL.remove();
      }
    }

    private static JobConf setUpEmbeddedHadoop(JobConf conf) throws Exception {
      if (System.getProperty("hadoop.log.dir") == null) {
        System.setProperty("hadoop.log.dir", new File(TEST_DIR_ROOT, "hadoop-log").getAbsolutePath());
      }
      if (System.getProperty("test.build.data") == null) {
        System.setProperty("test.build.data", new File(TEST_DIR_ROOT, "hadoop-data").getAbsolutePath());
      }

      int taskTrackers = 2;
      int dataNodes = 2;
      conf = new JobConf(conf);
      conf.set("fs.hdfs.impl.disable.cache", "true");
      conf.set("dfs.block.access.token.enable", "false");
      conf.set("dfs.permissions", "true");
      conf.set("hadoop.security.authentication", "simple");
      conf.set("hadoop.proxyuser." + getHadoopProxyUser() + ".hosts", getHadoopProxyUserHosts());
      conf.set("hadoop.proxyuser." + getHadoopProxyUser() + ".groups", getHadoopProxyUserGroups());
      conf.set("mapred.tasktracker.map.tasks.maximum", "4");
      conf.set("mapred.tasktracker.reduce.tasks.maximum", "4");

      String[] hadoopUsers = getHadoopUsers();
      if (hadoopUsers.length == 0) {
        throw new RuntimeException("No users/groups for Hadoop minicluster defined, use system property '" +
                                   HADOOP_USER_PREFIX + ".<USER>=<GROUPS>'");
      }
      for (String user : getHadoopUsers()) {
        String[] groups = getHadoopUserGroups(user);
        UserGroupInformation.createUserForTesting(user, groups);
      }

      DFS_CLUSTER = new MiniDFSCluster(conf, dataNodes, true, null);
      FileSystem fileSystem = DFS_CLUSTER.getFileSystem();
      fileSystem.mkdirs(new Path("/tmp"));
      fileSystem.mkdirs(new Path("/user"));
      fileSystem.mkdirs(new Path("/hadoop/mapred/system"));
      fileSystem.setPermission(new Path("/tmp"), FsPermission.valueOf("-rwxrwxrwx"));
      fileSystem.setPermission(new Path("/user"), FsPermission.valueOf("-rwxrwxrwx"));
      fileSystem.setPermission(new Path("/hadoop/mapred/system"), FsPermission.valueOf("-rwx------"));
      String nnURI = fileSystem.getUri().toString();
      int numDirs = 1;
      String[] racks = null;
      String[] hosts = null;
      MR_CLUSTER = new MiniMRCluster(0, 0, taskTrackers, nnURI, numDirs, racks, hosts, null, conf);
      return MR_CLUSTER.createJobConf(conf);
    }

    private Server createServer() {
      try {

        String host = InetAddress.getLocalHost().getHostName();
        ServerSocket ss = new ServerSocket(0);
        int port = ss.getLocalPort();
        ss.close();
        Server server = new Server(0);
        server.getConnectors()[0].setHost(host);
        server.getConnectors()[0].setPort(port);
        return server;
      }
      catch (Exception ex) {
        throw new RuntimeException("Could not stop embedded servlet container, " + ex.getMessage(), ex);
      }

    }

  }

}


text:
Minnesota Dem Candidate Voted Against Bill to Stop Insurance Payments to Convicted Terrorists
Ilhan Omar accused of being fringe, anti-Israel
Ilhan Omar / Getty Images
Adam Kredo - August 16, 2018 1:30 PM
Ilhan Omar, the former Minnesota legislator who won the Democratic primary for a House seat on Tuesday, once voted against a state bill to stop insurance payments to those convicted of terror acts, adding more fuel to accusations the candidate represents a fringe, anti-Israel section of the Democratic Party.
Omar, a Muslim Somali-American who has come under fire for her harsh criticism of Israel, was one of just two lawmakers in 2017 who voted against a Minnesota bill to deny life insurance payments to any person convicted of aiding or committing terror acts, according to official vote tallies.
Omar's objection to the bill has stoked critics on both sides of the political aisle who say the candidate's anti-Israel positions and soft stance on terrorism puts her in a growing stable of fringe Democratic lawmakers who single out the Jewish state for criticism.
Omar is vying to replace Democratic Rep. Keith Ellison, also a Muslim who has taken a hardline position on Israel and who has come under fire for his close association with groups and individuals labeled as anti-Semitic and anti-Israel.
Omar has dubbed Israel an "apartheid regime" in past comments and has been forced to defend herself against allegations of anti-Semitism for these and other similar comments.
Her vote against the bill to end life insurance payments for those involved in terrorism raised questions and some criticism at the time, though Omar has not recently been asked to explain the vote.
Omar's campaign did not immediately respond to a Washington Free Beacon request for comment on the vote and her reasons for opposing the measure.
In 2012, Omar claimed that Israel had "hypnotized the world" to turns its back on the state's "evil doings."
As she seeks to win Ellison's seat in Congress, Omar has attempted to walk back her previous comments and acknowledge Israel's right to exist.
However, pro-Israel organizations and others have shunned the candidate, saying she represents a growing fringe section of the Democratic Party that must be opposed by the Jewish political community.
"Saying that Israel 'hypnotized the world' and calling the Israeli government an 'apartheid Israeli regime,' is not only offensive and wrong, but hurts the progressive cause," one veteran Democratic political operative told the Free Beacon. "Ilhan Omar will either moderate her extreme and dangerous rhetoric or, at least when it comes to Middle East issues, she will be shunned by the Congressional Democratic Caucus and the Party as a whole."
The Jewish Democratic Council of America, one of the leading organizations supporting pro-Israel Democratic candidates, has declined to endorse the candidate over what it says is her anti-Israel sentiment.
"Now that Ms. Omar has emerged as the Democratic candidate, JDCA will not support her candidacy—and certainly will not endorse her—because her views are not aligned with our positions and values," the organization said in a recent statement to the Jewish press.
In addition to her anti-Israel comments, Omar came under scrutiny last year for opposing a Minnesota bill that would penalize parents who perform genital mutilations on their children. In that instance, Omar was one of four state lawmakers who opposed the bill.
Omar has been endorsed by prominent Muslim-American community organizations, including ones known for their use of anti-Israel and anti-Semitic rhetoric. Omar was also endorsed by Democratic-Socialist Alexandria Ocasio-Cortez.
The Arab-American Anti-Discrimination League, or ADC, a group known for promoting anti-Israel materials, has endorsed Omar, as has the Council on American Islamic Relations, or CAIR, another prominent Muslim organization known for its anti-Israel rhetoric.
"We are proud of the strong voter turnout of all Minnesotans in last night's primary, especially Minnesota Muslim voters, in making democracy work for everyone," said CAIR's Minnesota executive director Jaylani Hussein said in a statement. "Last night's historic primary exemplified the trust Minnesotan voters place in Muslim candidates running for office."
This entry was posted in Politics and tagged 2018 Election. Bookmark the permalink.
Hawley Blows Whistle on 'Deeply Troubling' Conduct by Missouri State Auditor
House Ethics Board: 'Substantial Reason to Believe' Tlaib Used Campaign as Personal Piggybank
Klobuchar on Abrams's Loss: 'I Don't Think The Voter Registration Rules Are Fair'
New Jersey Dem: Illegal Immigrants Mow 'Our Beautiful Lawns'
James Comey and Wife Donated Nearly $20K to Democrats This Year
McCready Decried Dark Money In 2018, Received $944K In Dark Money Help
O'Rourke Apologizes to Staff for Being 'Giant A**hole'
Abrams Hints at Challenging Kemp in 2022: 'We Won' But I'm Not the Governor 'Yet'

redpajama_set_name: RedPajamaCommonCrawl


Great question! I'm sure other people want to know this as well. Thank you for asking.
Every night this week, I plan to add the people who signed up that day. Once I add a new user, WordPress automatically sends that user an e-mail with his/her username and password.
to receive free membership, forever.
Most likely, each night this week, I'll add people at around midnight EST. I may add people sporadically throughout the day. Nevertheless, I'd rather you be pleasantly surprised than anxious or disappointed, i.e., don't bank on it.
1 If you're really bored and want to know why, shoot me an e-mail and I'll let you know.


Interview essays let you use people as your own sources instead of novels. The more fire you've got for a writing topic, the simpler it will really be to convey that emotion to your own audience and make a excellent descriptive essay. The very beginning action in creating a descriptive essay would be to pick your matter. This may undoubtedly make the fundamental skeleton and precis of your own essay. Think of your own opening for a map of your own composition, or possibly for helpful information. This really is a significantly useful device to anyone having to compose an article. Normally, you'll argue powerfully for the principal trigger in this sort of article. What you find yourself doing here significantly depends upon the form of article you're considering composing.
Advertising figure out what facets of industry you need to examine.
You don't presume they've any prior knowledge of the topic on that you're writing, but you really can suppose that they will have some measure of educational acumen. In writing a composition or an article, it's vital to comprehend your examiners are not only going to go over your content and also appear at important issues like your own grammar, punctuation, together with your design of composing. Effective creating is crucial forever – long achievement. Consider the subject you're authoring. A good deal of planning ought to enter your composition before you begin writing it. End by way of your thesis thought. By way of example basically'm creating a paragraph about' Style'. It was an overall statement which is surely eye-catching but still conveys the entire subject of the article.
This is your technique for transferring your change effort forward.
Now you have determined how many sentences are likely to be in your composition, generate because many factors to speak about, as your personal sentences are. For a standard 5 paragraph article, you're going to require a minimum of three motives, or elements to your own reply. The regular article should get an launch, at least three body sentences, plus a conclusion. This is fundamentally the conclusion of your own structure. You will locate some easy tips for writing powerful basic and compoundsentences. Because the following post is really about just how to start writing great English compositions, let's now dive right in to that. The term transitionsare found within the list of the vast majority of English texts, equally first-class school and university textbooks.
Within the finish the scholar has to restate idea and summarize what he's composed to support it.
In the event you're perplexed about using commas in several phrases, study the coming few paragraphs carefully. As a way to write phrases which are punctuated properly, the author should follow a couple basic rules. There are just three principal strategies to create a compound sentence. Additionally, training composing some easy sentences. It's the type of papers you'd write before composing a solution document. Making a revision plan is not a straightforward job, however it is a vital process if you choose to make certain that your paper reflection-paper has met the conditions of the mentor plus the article prompt. When you're writing your research paper's introduction, you must be constructing it around a particular describe that furnishes an overall summary of the paper. Compose how you'll utilize this insightful article in your Research paper.
Having a waitress, he'd slept in fact a couple of times weekly to get a complete summer.
Unless you have a particular duty provided that you assist limit your issue, this might be relatively of the task. The query might be a portion of your launch, or it could make a massive title. For something to become a excellent powerful essay topic, it must be an arguable issue. Compose a reply to that issue.


Viewing on your smart phone or tablet? Click here.
Viewing on your smart phone or tablet? Click here .
Like what you see? Click here, and start your subscription today!
Click the magazine to read the digital edition!


text:
DUAL TALENTED PERFORMER FINDS HIS PLACE IN THE BIG APPLE
FROM ANIMATION TO LIVE-ACTION CHIN-WEI GROWING HIS TALENT INTERNATIONALLY
FROM PHOTOGRAPHER TO VERSITILE ACTOR JUSTIN MARCEL MCMANUS SHINES THRU IT ALL
Chris Brown's Open Bar of Excuses has reached it's Last Call
The Cultural Appropriating Tour Bus Continues
R. Kelly's Time is Up. For Real.
Ways to naturally enhance your breasts
Turning 30: 10 Things Every Woman Should Have And Should Know
MADE Essentials: Carlos V Davis
ENTREPRENEURIAL SPIRIT BRENDA POND DEBUTS NEW COMPANY
DURING LOCKDOWN FASHION DESIGNER CREATES NEW PROJECTS TO INSPIRE
From the stage to The Sopranos: Artie Pasquale
Nick Christophers
by Nick Christophers
The diverse actor who got his beginning on a High School stage has went a long way. Artie Pasquale a native of Providence, RI first developed the "acting bug" when he became enthralled with the Westerns and Mob movies of his time. Actors like Edward G. Robinson, John Wayne. George Raft and James Cagney became his inspiration. But Artie was not to serious about acting since he also was involved in sports.
That soon changed when while he was in College and appeared in a few theater productions. When he was in school, he studied education and coaching. But the acting was short lived when marriage and children took a front seat. Yet Artie knew that the acting bug was still tugging at his heart.
He soon studied with Jacqueline Knox, Aleta Chappelle and the Buffalo Theater Group. Artie then ended up working on about ten film projects from 2006 to the present. After a few films he befriended creator and writer David Chase, who had him audition for the role of Burt Gervasi. As we all know, he had a recurring role until he was whacked in "The Blue Comet" episode (Season 6/Part 2) via a dramatic strangulation scene. We may also remember him as the bodyguard to Patsy Parisi (Dan Grimaldi) when they visited a Starbucks to shake them down but couldn't even do that.
"The Sopranos was certainly very special to be apart of that I will never forget. I know it's a cliché but it really was like a family everybody respected each other and appreciated everyone's efforts to make it a success, whether you had a starring role or a member of the crew. Working with such outstanding actors, writers and directors was very special and rewarding."
Even though Artie made his big debut on the Sopranos, he does not feel type-casted to always play a mobster. He has also appeared as a detective and a lawyer. He feels it is irrelevant which role is offered an actor he or she should treat it with the same enthusiasm and seriousness as any other.
The most recent project Artie is working on is a documentary entitled "LAST WILL OF EMBEZZLEMENT" WITH MICKEY ROONEY. The film is a collection of true stories about how senior citizens are taken advantage of by siblings, lawyers and the issue of reverse mortgage scams. The film is currently being shown around the country. It has already received positive reviews from the NY Times and hopes to qualify for an Academy. Besides this, he has also completed a film called "Red Corvette" about two high school girls in a very contemporary school. Artie plays the part of the High School principal.
When it comes to mob films Artie believes that the genre will always be popular. But he admits lately there are too many bad films on that subject. As a matter of fact Artie is working on trying to fund such a project. The film is called "Morning On Charlotte Street". It is a true story about a family and two brothers in the mid 50's on the tough streets of the Bronx. The film has a tragic twist Artie sees it as a combination of "West Side Story" and "Bronx Tale". It has already won some awards at various film festivals. Artie is also preparing for an Off–Broadway play which is to be directed by Danny Aiello. Artie is always on the move whether it is doing stage readings or film projects he is becoming a driving force in the industry.
FROM SHAKESPEARE TO MODERN PRODUCTIONS CARMO BEBIANO IS MAKING HER SELF KNOWN IN THE NEW YORK THEATRE SCENE
February 2020 | Nick Christophers
Actress, Carmo Bebiano has managed to fit right in with the hustle and bustle of the New York beat. She decided from a young age that acting would be a career she would...
NON-PROFIT ORGANIZATION UCA IN ILL. IS HONORED WITH THE VOCALS OF XIMU LIU
April 2020 | Nick Christophers
September 2020 | Nick Christophers
RECORDING ARTIST GUY GROGAN RETURNS WITH HIS NEW RELEASE "SAME MORNING LIGHT"
June 2020 | Nick Christophers
ACTRESS YULIANA SLEME IS ON A MISSION TO USE HER TALENT FOR UNITY
During these tense times where most people are on the defensive there are a few who utilize their talents to bring people of all walks of life together. Yuliana Sleme...
TLSR Menu
Copyright © Lifestyle Republic, a unit of CHELCA Publishing
CHELCA PUBLISHING NETWORK:
Suite929 | G Style Magazine | Tech We Like | #justabxmom


NETBALL—Ugandan netball is in a bed of roses arguably the best moment in the history of the sport in the country.
The She Cranes heroics of winning the African Netball Tournament was no mean feat. They have improved from 13th position to 9th in the world netball ratings and qualified for next year's Commonwealth Games.
Such accomplishments get noticed. And so a resolution was passed in Parliament on Tuesday to pay a special tribute to the She Cranes for winning the 2017 African Netball Tournament in Kampala. Led by inspirational player Peace Proscovia the Vincent Kiwanuka-coached side trounced Malawi Zimbabwe, Zambia, Botswana and Namibia in front of the partisan crowd to lift the coveted crown.
The motion for the resolution was moved by Masindi Woman MP Jalia Bintu and seconded by Oyam Woman MP Santa Alum.
Shadow minister for Sports and Makindye East MP Allan Sewanyana, commonly known as 'Musajja Wa Bwino' in Sports circles, took the bar higher proposing that each Member of Parliament contributes Sh500,000 toward purchase of bus for the national team as a token of appreciation to the gallant ladies.
The House was unanimous in agreement.
Part of the Sh244 million pledge will be directed toward construction of a modern netball court for the national team.
The She Cranes have been a common chapter on the pages of financial constraints in preparations for major events. For last month's African Netball Championships, Uganda Netball Federation needed Sh750 million to prepare both She Cranes and U21 She Pearls for games. The latter is currently enduring a splendid tournament in the World Youth Cup in Gaborone, Botswana.
In 2015, the sports fraternity in the country hit ignominy buttons when She Cranes players had to organise a car wash drive to crowd fund for their participation in the Netball World Cup.
Meanwhile, in Botwsana today, the She Pearls entertain favourites Jamaica looking for a victory that would guarantee them first-place finish in Group C in the final day of preliminary round games at the ongoing Netball World Youth Cup.
The high flying and unbeaten Ugandan U21 side has been a team to beat in a "group of death", winning three consecutive games to secure a quarter final berth with a game to spare. The David Bogere-coached side annihilated Malaysia 81-21 in their tournament opener, followed with a hard-fought 46-42 victory over hosts Botswana and a comfortable 52-36 win over point donors Cook Island yesterday.
Now standing in their way are the highly fancied Jamaicans, whose surprise 48-46 loss to Botswana has put their chances of progression in jeopardy. The Jamaicans, ranked 4th in world, will pose a much bigger threat to Ugandans compared to the other victims that have tested the wrath of She Pearls.
Yet Uganda's hopes of leaving the Jamaican duel with bragging rights will greatly hinge on performances from Captain Joan Nampungu, GS Irene Eyaru, C Player Betty Kizza and GA Sharifa Nalunkuma. The quartet has been at heart of every good achievement the She Pearls have scripted thus far.
She Pearls are looking good to compete for top honors at the prestigious event. The top eight nations will be re-grouped in two groups to decide the semi-finalists.
The Netball World Youth Cup, the first event to be held in Africa by International Netball Federation, is the pinnacle of net ball competition for emerging players who under 21 years of age.


text:
KOTC Sticker Pack Volume 3 - All-Star
11 stickers inspired by the most iconic basketball moments in February history, the All-Star collection.
AI's All-Star MVP game at the 2001 All-Star game, "The Greatest Comeback", AG vs Zach's Slam Dunk Contest 2016, "Showdown for the Ages", VC's Slam Dunk Contest 2000, "It's Over", and JLin's 2012 run, "Linsanity"
Vinyl stickers with matte lamination
Approx. 2x2-3.5 inches per sticker
Includes gloss header, matte card, and plastic
Back to All-Star


If you're thinking of upgrading to a new mattress, you may be surprised at how affordable it can be to switch. A basic, budget queen mattress can cost as little as $200. If you've got issues like back pain or snoring, or just want to invest in a more durable and comfortable model, however, you'll want a premium mattress, which can cost closer to $2,000. Considering that you'll spend a third of your time in bed, that's a worthwhile investment. Ready to invest in your health and well-being? Our guide to the Best Places to Buy a Mattress in New Orleans is based on a thorough survey of local reviews from third-party sites like Google Local and Yelp, all grouped by neighborhood. Read on and find the best and closest place to buy a mattress in New Orleans.
Located in the Mid City neighborhood, Mattress Direct (200 N Carrollton Ave, New Orleans, LA 70119) has a massive selection of mattresses , bedding and accessories from both popular and economy brands like Dr Greene's, Five Star Mattress, Knickerbocker, Malouf, My Pillow, Protect-A-Bed, Purecare, Relief Bed, Serta, Simmons, and Tempur-Pedic. The store support a number of local and international charities, and offers affordable mattresses through its factory- direct pricing model. With discounted prices, a great clearance selection, and friendly customer service, Mattress Direct has earned an average rating of four stars with local shoppers on both Google and Yelp.
There is a second location of Mattress Direct (1817 Veterans Memorial Blvd, Metairie, LA 70005) near the Causeway bridge in Metairie, as well as a location of American Freight Furniture and Mattress (3409 N Interstate 10 Service Rd W, Metairie, LA 70002). American Freight is a popular national chain selling both affordable mattresses and furniture, with a focus on selection and value. The store specializes in inventory sourced from liquidation and disbursement of unclaimed freight, canceled orders, closeouts, overruns, and special buyouts, and has serious discounts on memory foam and innerspring mattresses, as well as box springs, beds frames and headboards.
Mattress Firm (5300 Tchoupitoulas St #1, New Orleans, LA 70115) has a very highly-rated store in the southern area of New Orleans, which local shoppers award an average of 4.9 stars on Google and 4.5 on Yelp. Mattress Firm is the nation's most popular mattress retail chain, and has a large selection of top mattresses in innerspring, memory foam, hybrid, latex and gel models, as well as adjustable bases. The staff are highly trained in matching customers to the best mattress for their sleep style, and win praise from shoppers for their patient and friendly customer service.
One of the few mattress stores in East New Orleans is Furniture Mart (9921 I-10 Service Rd, New Orleans, LA 70127), which carries both =home furnishings and mattresses, as well as bedding and futons. Furniture Mart carries a wide array of mattress styles, including latex foam, memory foam, gel, hybrid, inner spring, pillow top and euro top mattresses.
Another highly-rated mattress store in New Orleans is Bedding Plus (1801 Airline Dr, Metairie, LA 70001). Bedding Plus carries affordable mattresses from top brands like Serta, Simmons, and Tempur-pedic, along with sleep accessories like mattress toppers and protectors, linens, and memory foam pillows. Next-day delivery and set-up is free and can be changed with 24 hours notice. Another option in the area is Mattress Payless (4401 Veterans Memorial Blvd, Metairie, LA 70006), which has earned a five-star Yelp review. Customers appreciate the fast delivery and patient customer service, as well as the low prices at Payless Mattress- as low as $99 for a twin mattress.


text:
Taking a thoughtful look at arts, entertainment, and pop culture
ETCast
Brian Terrill's 100 Film Favorites
Dan's Top 100 Everything
The Wonder Years Recaps
Pokemon Movies Retrospective
10 Things Brian Likes
Animation Evaluation
Ranking the Numbers 1-10
Earn This Staff / February 24, 2015
Here at Earn This, we love ridiculous arguments. Perhaps the most ridiculous argument we've ever had is: What numbers are best? (This was a particularly amusing outtake from our "Top 5" podcast.) In the spirit of our Year of 100 Lists, we decided to create a definitive ranking of the numbers from 1 to 10. Numbers can be "greater" than other numbers for any reason: aesthetic beauty, cultural significance, inherent badassery… we let each member of our team decide the criteria. And, boy, did the results vary: It turns out people value numbers (like any abstract idea) for a wide variety of reasons. Ten people created ten rankings of the numbers; the lists were aggregated and averaged; everyone contributed some thoughts. Here are the results: An authoritative rank of the numbers from 1 to 10, ranked from worst to best. (And don't forget to read the counterpoints when you're done with this article.) – Dan
10. Six
Average rank: 8.6/10
Will says: Seriously, this should be obvious, there is nothing notable, unique, or favorable about the number six. I mean, can you think of any famous sextuplets? Any famous Sixth's? Sure, its in the upper half of the numbers in question, but its by far the lamest of the 6-10 numbers. Six is easily the worst number between one and ten mathematically. In fact, six is the only number between one and ten that is not a perfect square, perfect cube, or prime number, excluding 10, which gets a clear boon because of it being the first double digit number. One of the more "hip with the now" usages of the numbers 1-10 is 1337 5P34K, and six even fails here. What is a 6 in 1337? a G? Maybe, but you'd never be able to tell on first glance. "But Will!" You say, "The Sixth month is June, that's the start of summer!" I know! But, honestly, is the first month in any season the most notable month of that season (with the obvious exception of December and winter)? June is the deceptive month where it seems like it's hot enough to go swimming right up until you dive into the pool and freeze your butt off. I mean… without a doubt, August is the quintessential summer month, with July as a runner up. Six is so lame, I use it as an expression of indifference over something. "How was that?" A friend/colleague might ask, "Six out of ten." I'll reply, And that's it. Nothing to add. Sheer mediocrity.
9. Eight
Kevin says: Eight. Infinity on its side. The number of corners on a cube. Nature's favorite way to organize its elementary particles. Eight. It's always been the number I've struggled to write neatly on a consistent basis. Circles are hard enough to draw right as is. But two circles? It's as if the math gods wanted to play a practical prank on us and have one of the fundamental numbers be something math students groan over at the thought of writing. Oh well, at least it's a hell of a lot better than that tedious roman numeral system. When I think about the number eight, it reminds me of nature's favoritism towards it. Why does eight valence electrons satisfy the octet rule? Why are baryons and mesons organized in an octet? And I've never understood why. Sure, it organizes itself nicely into a cube in 3D space, but in 2D? The most symmetrical shape you can make out of 8 non-redundant points is an octagon.. But an octagon is hardly as simple as it gets. It's made up of two or more rhombuses, which are made out of triangles. Clearly there should be three fundamental particles! When science history stood at a place in time where the most elementary particles were the proton, neutron, and electron, people must've slept peacefully over its simplicity. Eight has just complicated things. And who likes it when anything plays favorites?
8. Nine
Daniel says: Absolute massive respect if you can name the top-scoring NBA player who wore number 9. Give it a minute… don't know? The honor goes to hall-of-famer "Big Blue" Bob Pettit, of the Milualkee/St. Louis Hawks from 1955-1965, currently ranked 35th all-time in scoring. I think that sums up succinctly why 9 appears so low on our list: it represents the outdated nature of the number, better suited for our parents' or even grandparents' generation. Good riddance.
7. Four
Brad says: Here's where the numbers actually begin to get interesting. While 4 isn't much to look at, it has some hidden surprises. It's a perfect square. It's 2+2, 2*2, and 2^2. Despite all of this, it's still pretty stupid-looking and not even a prime number. Let's call it slightly below average.
6. Five
Katy says: There's nothing inherently faulty about five. It's the number of fingers on your hand, the clean break between zero and ten, deliciously prime. What explains our lukewarm reaction? Well, numerically, it lies in the middle of the pack. As for the aesthetic of the word, five does have the interest of the v sound, but doesn't use it to the musical extent of seven — and neither can trump staccato eight or resonant three. The form, 5, is neither easy to write nor as visually pleasing as loopy 6 and 9. Five does have some things going for it: The five-second rule. Iambic pentameter. Quitting time for your average desk job. It's certainly a solid pillar in the first decade of numbers, but we'll leave the fireworks for the stars.
5. Ten
Brian says: WHOO DECIMAL!
Our standard counting system, using Arabic numerals, is base-10, meaning we "count up" using ten distinct symbols before we wrap around again and add another column. The choice of ten wasn't arbitrary; it was likely influenced by the fact that humans have ten fingers and ten toes, useful tools for simple counting. Base-10 wasn't an Arabic innovation: the ancient Greeks, Romans, and Chinese used it too. But other cultures have chosen different bases.
If we were ancient Babylonians, we might favor 60. If we were computers, we might choose 2, or 8, or 16. But ten is what we picked, and it's deeply ingrained in our day-to-day life. The entire Metric system is based on powers of ten. Hundreds. Thousands. Sure, other bases have a 1 followed by 0s. But who would want to marry a binary millionaire?
4. Two
Patrick says: Most good things come in pairs, and indeed 2 is a pretty good number. It is the only even prime, as well as an important part of the definition of both even and odd numbers. You have two eyes, two ears, two hands, and plenty of other pairs of things. I mean consider it – you don't have 3 feet, do you? You don't have 5 eyes? You don't even have 1 hand! (Unless you're a pirate).
Two does have its shortcomings though. If you eat two Lays, you've proven them right. A week with two days would be far too short, and a tripod with two legs would just fall over. Besides, you could hardly call it number one.
3. Seven
Dan says: Perched innocuously between six and eight is The Little Number That Could. It's the largest single-digit prime, asymmetrical in a beautiful way. In western culture, few numbers are as meaningful as seven. There's something mystical about it that attracts thinkers and storytellers: there are seven seas and sins; seven wonders of the world and days of the week; seven gates at Thebes and years at Hogwarts. But seven is also a joyful number: in Vegas, it's a jackpot; on Astroturf, it's a touchdown. Mathematically, seven is fascinating, and dividing by seven produces bizarre cyclical numbers. In other words, seven is a little bit of everything to everyone.
As far as I'm concerned, it's no coincidence "seven" rhymes with "Heaven."
2. Three
Grant says: Inherent meaning, cultural significance, general badassery—3 has it all. No other number has enough range to form the bedrock foundation of everything from baseball rules to religious tenets to pop music conventions. The third line is the punch line, the third act where everything starts to matter, third down the money down. And so often, the third entry in a group means everything: A third aberrational event marks a trend. A third (consecutive) championship stamps a legend. 40 actors have won 2 Oscars; only 6 have won 3. All in all, whether we're considering dimensions, trophies won, or number of participants in an intimate encounter, 3 is the dynamic game-changer, the alchemistic wild card that takes everything to the next level. When you hit 3, things start to get real.
Colton says: If it's lonely at the top, then "one is the loneliest number."
How could anything else be number one? This is literally the number, one. One is what we strive for. As an individual we want to be first place, one of a kind. As groups we seek unity, to be of one mind with one another and hold a single firm identity. You can get to all these other numbers just by adding up ones, making one the foundation in a way zero could never be. In the dichotomy of singular vs. plural, one stands alone against the world. They say everybody's got one. The truth is, nobody's ever had One: it stands undefeated, the champion for all time.
Disagree with the ranking? Read some counterpoints
See the complete voting results and ballots for this most ridiculous list
[wp_biographia user="dan"]
[wp_biographia user="grant"]
[wp_biographia user="colton"]
[wp_biographia user="brian"]
[wp_biographia user="kevin"]
[wp_biographia user="brad"]
[wp_biographia user="daniel"]
[wp_biographia user="katy"]
[wp_biographia user="patrick"]
[wp_biographia user="will"]
February 24, 2015 in Miscellaneous. Tags: list, one is the loneliest number, Year of 100 Lists
The Earn This Podcast, Episode 29: From the Vaults – LoCo Brewfest 2015
Fulfilling My Hamiltonian Destiny, Part 2
The Earn This Podcast, Episode 28: A Boozy Farewell
← Ranking the Seasons of The Office
Ranking the Numbers 1-10: Voting Results →
3 thoughts on "Ranking the Numbers 1-10"
I'd like to see a ranking of our ranking of the numbers 1-10. (I.e. By description)
Colton says:
Bennie Cannan says:
I read this post fully on the topic of the resemblance of newest and preceding technologies, it's remarkable article.|
Jamie Lane on Songs of the Summer Mixtape Draft, Part 2
Kieth Macknight on Brian Terrill's 100 Film Favorites – #42: "Beauty and the Beast"
Visit This Link on Dan's Top 100 Everything: #56 Final Fantasy
read more on Dan's Top 100 Everything: #56 Final Fantasy
Learn More Here on The Wonder Years S03E08 – The Pimple


"Is it time for a war on poaching? When Hillary Clinton unveiled an $80 million plan last week to combat elephant poaching in Africa, she highlighted a new and worrying trend: money from wildlife crime may be helping to fund terrorist groups. These include the al-Shabaab group that attacked the Westgate shopping mall in Kenya two weeks ago.


I'm Sarah. Thanks so much for stopping by! I've put my heart & soul into this brand and into the work I do every day and I'm so glad that you felt a connection to it. Now it's my turn to connect with YOU and create the images you've always dreamed of. Curious to learn a little bit about me? Click below!
We cannot recommend Banko Photo enough! From start to finish, we were extremely satisfied with our experience and loved working with Sarah. She was prompt in her correspondence and worked with our hectic schedule. During our shoot she made us feel laid back and comfortable, which in turn helped her capture the true essence of our family.
We are so pleased with Sarah's work shooting us three years in a row. She has produced beautiful images of our family capturing the spirit and personality of our two young daughters. She is a true professional and puts us at ease.


Published 04/21/2019 06:25:42 am at 04/21/2019 06:25:42 am in Stainless Chain.
stainless chain stainless steel sash chain ins10 in 302 s0631 0 stainless chain ring bolts ice.
stainless steel electric chain hoist,stainless steel chain lowe's,stainless chain nzd,stainless chain ring bolts shims,stainless chain links,6mm stainless chain links,stainless chain nzone,galvanized steel chain-link fence top rail,stainless steel chain link fence prices,black steel chain-link fence line post,stainless chain ring bolts ice.


Pack of 5 Tatuaje Havana VI Gordito (5 1/2 x 56) packaged and sealed with Humidipak for Humidified Shipping!
New for 2010, this is the first new size added to the original Havana VI line.
Made at the My Father Cigar factory in Esteli, Nicaragua.


Enter the email address associated with your account below and select Forgot Username. Your Username will be sent to the email address provided. You may make additional changes to your profile from within the Account Manager.


With Christmas fast approaching, we're all wondering whether we'll see any snow this year... but where does that leave you as an employer?
Whilst the festive period may be your busiest time of the year, ACAS is very clear that you can't insist employees come to work if they feel the journey would be unsafe due to weather conditions.
There is no automatic right to pay employees for snow days, however you should always check what's written in your contract of employment before withholding a days wage.
If an employee is requesting the day off due to their children's school or daycare being closed, they would most likely be entitled to parental leave or emergency leave for dependants. In this case, you would be required to give them 'reasonable' time off to make alternative arrangements.
You can help to keep your business running smoothly by checking weather updates and pre-planning the workload based on reduced staffing numbers. Whilst there is no automatic right for employees to be paid if they are absent from work, this is not the case if the business has to close. If you need to close your premises due to heavy snow fall, you should pay employees as per their contracted hours - however, you can request that they work remotely if their job allows for that.


Welcome to Damah International Film Festival!
With support from notable jurors and key sponsors, Damah is anticipating this year's film festival where we can continue to build on the platform to discover and promote spiritual themes and experiences through film.
Damah Film Festival Comes to Tokyo!
Mark Joseph is an award-winning producer who has been involved in some of the biggest films in history including The Passion of The Christ, The Chronicles of Narnia, Ray, Holes. He was a producer on Max Rose starring Jerry Lewis and The Vessel starring Martin Sheen and is currently producing the films Reagan starring Dennis Quaid and Dark Horse starring Tim Allen.


I started out with the Horizon 3 pictured in the last post. I "tried on" several horizons and foreground and I ended up with an entirely new piece using none of the components from Horizon 3.
I tried the foreground two different way; horizontal and vertical. I liked them both but ended up choosing the horizontal. I have it on the backing and when the temperature goes above zero I will attempt to cut a new frame for it.
Oh la la, those colors, I swim in them, I savor them!!