<commit_before>/*
 * The Alluxio Open Foundation licenses this work under the Apache License, version 2.0
 * (the "License"). You may not use this work except in compliance with the License, which is
 * available at www.apache.org/licenses/LICENSE-2.0
 *
 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
 * either express or implied, as more fully set forth in the License.
 *
 * See the NOTICE file distributed with this work for information regarding copyright ownership.
 */

package alluxio.worker.block.evictor;

import alluxio.Configuration;
import alluxio.PropertyKey;
import alluxio.annotation.PublicApi;
import alluxio.util.CommonUtils;
import alluxio.worker.block.BlockMetadataManagerView;
import alluxio.worker.block.BlockStoreLocation;
import alluxio.worker.block.allocator.Allocator;

import com.google.common.base.Throwables;

import javax.annotation.concurrent.ThreadSafe;

/**
 * Interface for the eviction policy in Alluxio.
 */
@PublicApi
public interface Evictor {

  /**
   * Factory for {@link Evictor}.
   */
  @ThreadSafe
  class Factory {

    private Factory() {} // prevent instantiation

    /**
     * Factory for {@link Evictor}.
     *
     * @param view {@link BlockMetadataManagerView} to pass to {@link Evictor}
     * @param allocator an allocation policy
     * @return the generated {@link Evictor}
     */
    public static Evictor create(BlockMetadataManagerView view, Allocator allocator) {
      try {
        return CommonUtils.createNewClassInstance(
            Configuration.<Evictor>getClass(PropertyKey.WORKER_EVICTOR_CLASS),
            new Class[]{BlockMetadataManagerView.class, Allocator.class},
            new Object[]{view, allocator});
      } catch (Exception e) {
        throw Throwables.propagate(e);
      }
    }
  }<commit_msg>[ALLUXIO­2788] fix by replace Throwables.propagate with RuntimeException.<commit_after>/*
 * The Alluxio Open Foundation licenses this work under the Apache License, version 2.0
 * (the "License"). You may not use this work except in compliance with the License, which is
 * available at www.apache.org/licenses/LICENSE-2.0
 *
 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
 * either express or implied, as more fully set forth in the License.
 *
 * See the NOTICE file distributed with this work for information regarding copyright ownership.
 */

package alluxio.worker.block.evictor;

import alluxio.Configuration;
import alluxio.PropertyKey;
import alluxio.annotation.PublicApi;
import alluxio.util.CommonUtils;
import alluxio.worker.block.BlockMetadataManagerView;
import alluxio.worker.block.BlockStoreLocation;
import alluxio.worker.block.allocator.Allocator;

import java.lang.RuntimeException;
import javax.annotation.concurrent.ThreadSafe;

/**
 * Interface for the eviction policy in Alluxio.
 */
@PublicApi
public interface Evictor {

  /**
   * Factory for {@link Evictor}.
   */
  @ThreadSafe
  class Factory {

    private Factory() {} // prevent instantiation

    /**
     * Factory for {@link Evictor}.
     *
     * @param view {@link BlockMetadataManagerView} to pass to {@link Evictor}
     * @param allocator an allocation policy
     * @return the generated {@link Evictor}
     */
    public static Evictor create(BlockMetadataManagerView view, Allocator allocator) {
      try {
        return CommonUtils.createNewClassInstance(
            Configuration.<Evictor>getClass(PropertyKey.WORKER_EVICTOR_CLASS),
            new Class[]{BlockMetadataManagerView.class, Allocator.class},
            new Object[]{view, allocator});
      } catch (Exception e) {
        throw new RuntimeException(e);
      }
    }
  }
{'fraction_non_alphanumeric': 0.0890557939914163, 'fraction_numerical': 0.003218884120171674, 'mean_word_length': 3.66125, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, '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': '7591985', 'n_tokens_mistral': 1028, 'n_tokens_neox': 997, 'n_words': 329}