conflict_resolution stringlengths 27 16k |
|---|
<<<<<<<
import alluxio.master.AlluxioMasterService;
=======
import alluxio.master.MasterProcess;
import alluxio.master.file.meta.options.MountInfo;
>>>>>>>
import alluxio.master.MasterProcess; |
<<<<<<<
private final String mUsername;
private final String mGroupname;
private final int mPermission;
=======
private final boolean mIsPersisted;
>>>>>>>
private final String mUsername;
private final String mGroupname;
private final int mPermission;
private final boolean mIsPersisted;
<<<<<<<
... |
<<<<<<<
ret.username = getUsername();
ret.groupname = getGroupname();
ret.permission = getPermission();
=======
ret.ttl = Constants.NO_TTL;
>>>>>>>
ret.ttl = Constants.NO_TTL;
ret.username = getUsername();
ret.groupname = getGroupname();
ret.permission = getPermission();
<<<<<<<
... |
<<<<<<<
import tachyon.client.ClientContext;
import tachyon.client.ClientOptions;
=======
import tachyon.client.ClientContext;
>>>>>>>
import tachyon.client.ClientContext;
import tachyon.client.ClientContext;
<<<<<<<
import tachyon.client.lineage.TachyonLineageFileSystem;
import tachyon.thrift.BlockInfoException;
... |
<<<<<<<
new ProcedureDescriptionEnrichments(language, serviceProvider, ctx);
enrichments.setIdentifier(procedure.getIdentifier()).setProcedure(procedure).setVersion(version)
.setDescription(desc).setProcedureDescriptionFormat(format).setSession(session).setValidTime(validTime)
... |
<<<<<<<
mBlockMaster = new BlockMaster(blockJournal, mTachyonConf);
mFileSystemMaster =
new FileSystemMaster(mTachyonConf, mBlockMaster, fsJournal, new MasterSource());
=======
mBlockMaster = new BlockMaster(mTachyonConf, blockJournal);
mFileSystemMaster = new FileSystemMaster(mTachyonConf, mB... |
<<<<<<<
=======
* mLocalTachyonCluster is not closed in after(). Need to be closed by any test method.
*
* @throws Exception
*/
@After
public final void after() throws Exception {
mLocalTachyonCluster.stop();
mExecutorService.shutdown();
}
@Before
public final void before() throws Excep... |
<<<<<<<
private NettyPacketReader(FileSystemContext context, WorkerNetAddress address,
Protocol.ReadRequest readRequest) {
=======
private NettyPacketReader(FileSystemContext context, WorkerNetAddress address, long id,
long offset, long len, long lockId, long sessionId, boolean noCache,
Protocol... |
<<<<<<<
mMaster.start(true);
mMaster.grantAccess(BlockMasterTest.this); // initializes mPrivateAccess
=======
>>>>>>>
<<<<<<<
mMaster.workerRegister(workerId, ImmutableList.of(1024L), ImmutableList.of(1024L),
ImmutableMap.of(1L, blocks));
=======
mMaster.workerRegister(workerId, Arrays.asL... |
<<<<<<<
import alluxio.master.journal.JournalOutputStream;
import alluxio.master.journal.NoopJournalContext;
=======
>>>>>>>
import alluxio.master.journal.NoopJournalContext;
<<<<<<<
=======
import alluxio.underfs.options.MkdirsOptions;
import alluxio.util.CommonUtils;
>>>>>>>
import alluxio.util.CommonUtils;
<... |
<<<<<<<
import alluxio.web.MasterUIWebServer;
=======
import alluxio.wire.BlockInfo;
>>>>>>>
import alluxio.web.MasterUIWebServer;
import alluxio.wire.BlockInfo; |
<<<<<<<
import alluxio.master.file.meta.TempInodePathForChild;
import alluxio.master.file.meta.TempInodePathWithDescendant;
=======
import alluxio.master.file.meta.TempInodePathForDescendant;
>>>>>>>
import alluxio.master.file.meta.TempInodePathForChild;
import alluxio.master.file.meta.TempInodePathForDescendant;
<... |
<<<<<<<
=======
>>>>>>>
<<<<<<<
=======
>>>>>>>
<<<<<<<
=======
>>>>>>>
<<<<<<<
@Override
=======
>>>>>>>
@Override
<<<<<<<
=======
@Override
public EReportingNetwork getNetwork() {
return network;
}
@Override
public HasNetwork setNetwork(EReportingNetwo... |
<<<<<<<
String ufsRoot = Configuration.get(PropertyKey.UNDERFS_ADDRESS);
UnderFileSystem ufs = UnderFileSystem.Factory.create(ufsRoot);
=======
String ufsRoot = Configuration.get(PropertyKey.MASTER_MOUNT_TABLE_ROOT_UFS);
UnderFileSystem ufs = UnderFileSystem.Factory.get(ufsRoot);
>>>>>>>
String u... |
<<<<<<<
mWorkerMetricsSystem.start();
// Add the metrics servlet to the web server, this must be done after the metrics system starts
mWebServer.addHandler(mWorkerMetricsSystem.getServletHandler());
getExecutorService().submit(
new HeartbeatThread(HeartbeatContext.WORKER_BLOCK_SYNC, mBlockMast... |
<<<<<<<
clearLoginUser();
TachyonFSTestUtils.createByteFile(mTfs, "/testFile", WriteType.MUST_CACHE, 10);
=======
Whitebox.setInternalState(LoginUser.class, "sLoginUser", (String) null);
FileSystemTestUtils.createByteFile(mTfs, "/testFile", WriteType.MUST_CACHE, 10);
>>>>>>>
clearLoginUser();
... |
<<<<<<<
/**
* Gets the Tachyon master address from the configuration
*
* @return the InetSocketAddress of the master
*/
private InetSocketAddress getMasterAddress() {
String masterHostname =
mTachyonConf.get(Constants.MASTER_HOSTNAME, NetworkUtils.getLocalHostName(mTachyonConf));
int ma... |
<<<<<<<
.add(
JournalEntry.newBuilder()
.setSetAcl(File.SetAclEntry.newBuilder()
.setId(TEST_FILE_ID)
.setOpTimeMs(TEST_OP_TIME_MS)
.setUserName(TEST_PERMISSION_STATUS.getUserName())
.setGroupName(TEST_PERMISSION_STATUS.getG... |
<<<<<<<
import tachyon.security.authorization.PermissionStatus;
=======
import tachyon.underfs.UnderFileSystem;
>>>>>>>
import tachyon.security.authorization.PermissionStatus;
import tachyon.underfs.UnderFileSystem;
<<<<<<<
new InodeDirectory(ROOT_INODE_NAME, mDirectoryIdGenerator.getNewDirectoryId(), NO_... |
<<<<<<<
mBytesWritten = 0;
=======
mLocationPolicy = Preconditions.checkNotNull(options.getLocationPolicy(),
PreconditionMessage.FILE_WRITE_LOCATION_POLICY_UNSPECIFIED);
>>>>>>>
mBytesWritten = 0;
mLocationPolicy = Preconditions.checkNotNull(options.getLocationPolicy(),
PreconditionMe... |
<<<<<<<
import tachyon.client.TachyonFile;
=======
import tachyon.client.next.file.FileInStream;
>>>>>>>
import tachyon.client.TachyonFile;
import tachyon.client.next.file.FileInStream; |
<<<<<<<
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
=======
import org.n52.sos.exception.CodedException;
>>>>>>>
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.n52.sos.exception.CodedException; |
<<<<<<<
@JsonProperty("lastModificationTimeMs") long lastModificationTimeMs,
@JsonProperty("childrenIds") Set<Long> childrenIds,
@JsonProperty("username") String username,
@JsonProperty("groupname") String groupname,
@JsonProperty("permission") short permission) {
super(creationTimeMs,... |
<<<<<<<
.put(JournalEntryType.INODE_PERSISTED, new PersistDirectoryEntry(TEST_FILE_ID, true))
=======
.put(JournalEntryType.INODE_PERSISTED, new PersistDirectoryEntry(TEST_FILE_ID))
.put(JournalEntryType.ADD_CHECKPOINT,
new PersistFileEntry(TEST_FILE_ID, TEST_LENGTH_BYTES, TEST_OP_TIME_MS)... |
<<<<<<<
import alluxio.client.QuietlyCancelable;
=======
import alluxio.client.Cancelable;
import alluxio.client.block.BlockWorkerClient;
>>>>>>>
import alluxio.client.Cancelable;
<<<<<<<
public static PacketOutStream createLocalPacketOutStream(FileSystemContext context,
WorkerNetAddress address, long id, l... |
<<<<<<<
public void init() throws IOException {
mTachyonHome =
File.createTempFile("Tachyon", "U" + System.currentTimeMillis()).getAbsolutePath();
// Delete the temp dir by ufs, otherwise, permission problem may be encountered.
UnderFileSystemUtils.deleteDir(mTachyonHome, MasterContext.getConf());... |
<<<<<<<
if (mInodeTree.exists(path)) {
return mInodeTree.getInodeByPath(path).getId();
} else {
try {
return loadMetadata(path, true);
} catch (Exception e) {
throw new InvalidPathException("Could not find path: " + path);
}
}
=======
Inode i... |
<<<<<<<
new ClientOptions.Builder(sTachyonConf).setTachyonStorageType(TachyonStorageType.STORE)
.setUnderStorageType(UnderStorageType.SYNC_PERSIST).build();
=======
new OutStreamOptions.Builder(sTachyonConf).setTachyonStorageType(TachyonStorageType.STORE)
.setUnderStorageType(U... |
<<<<<<<
import tachyon.client.BlockHandler;
import tachyon.conf.TachyonConf;
=======
>>>>>>>
import tachyon.conf.TachyonConf;
<<<<<<<
new StorageDir(i + 1, workerDirFolder + dirPaths[i], mCapacity, "/data", "/user",
null, new TachyonConf());
initializeStorageDir(mStorageDirs[i], mUserI... |
<<<<<<<
import org.apache.thrift.transport.TNonblockingServerSocket;
import org.apache.thrift.transport.TTransportException;
=======
import com.google.common.base.Throwables;
>>>>>>>
import org.apache.thrift.transport.TNonblockingServerSocket;
import org.apache.thrift.transport.TTransportException;
import com.googl... |
<<<<<<<
import com.google.common.primitives.Ints;
=======
import com.google.common.io.Closer;
>>>>>>>
import com.google.common.primitives.Ints;
import com.google.common.io.Closer;
<<<<<<<
if (mBuffer.position() + len >= mTachyonConf.getBytes(Constants.USER_FILE_BUFFER_BYTES,
Constants.MB)) {
if... |
<<<<<<<
import tachyon.util.io.FileUtils;
=======
import tachyon.worker.WorkerContext;
>>>>>>>
import tachyon.util.io.FileUtils;
import tachyon.worker.WorkerContext;
<<<<<<<
/**
* Make a temp block in StorageDir.
*
* @param userId user who caches the data
* @param blockId id of the cached block
* @... |
<<<<<<<
@Test
public void createFileWithUfsFileTest() throws IOException {
String tempFolder = mMasterTachyonConf.get(Constants.UNDERFS_ADDRESS, "/underfs");
UnderFileSystem underFs = UnderFileSystem.get(tempFolder, mMasterTachyonConf);
OutputStream os = underFs.create(tempFolder + "/temp", 100);
os... |
<<<<<<<
Map<String, String> after = Configuration.toMap();
Assert.assertEquals(before.size() + 3, after.size());
Assert.assertEquals(TEST_S3_ACCCES_KEY, Configuration.get(PropertyKey.S3N_ACCESS_KEY));
Assert.assertEquals(TEST_S3_SECRET_KEY, Configuration.get(PropertyKey.S3N_SECRET_KEY));
=======
l... |
<<<<<<<
public void iteratorRemoveTest() {
=======
public void iteratorRemove() {
long removed = 0;
>>>>>>>
public void iteratorRemove() { |
<<<<<<<
public long loadFileInfoFromUfs(String path, String ufsPath, boolean recursive)
throws FileAlreadyExistException, BlockInfoException, SuspectedFileSizeException,
TachyonException, InvalidPathException {
Preconditions.checkArgument(ufsPath != null && !ufsPath.isEmpty(), "UFSPath is required.");... |
<<<<<<<
conf.getClass(Constants.WORKER_EVICT_STRATEGY_CLASS, LRUEvictor.class),
new Class[]{BlockMetadataManagerView.class, Allocator.class},
new Object[]{view, allocator});
=======
conf.<Evictor>getClass(Constants.WORKER_EVICT_STRATEGY_CLASS),
new Class[]{B... |
<<<<<<<
private static CreateDirectoryOptions sCreatePersistedDirOptions =
CreateDirectoryOptions.defaults().setWriteType(WriteType.THROUGH);
=======
private static CreateDirectoryOptions sCreateDirectoryOptions =
CreateDirectoryOptions.defaults().setRecursive(true);
>>>>>>>
private static CreateDi... |
<<<<<<<
import tachyon.util.io.PathUtils;
=======
import tachyon.util.CommonUtils;
>>>>>>>
import tachyon.util.io.PathUtils;
import tachyon.util.CommonUtils;
<<<<<<<
Assert.assertFalse(fileInfo.isCompleted);
=======
Assert.assertFalse(fileInfo.isComplete);
Assert.assertEquals(Constants.NO_TTL, fileInf... |
<<<<<<<
import tachyon.util.io.PathUtils;
import tachyon.util.network.NetworkAddressUtils;
=======
>>>>>>>
import tachyon.util.network.NetworkAddressUtils;
<<<<<<<
private final boolean mOneWorkerPerHost;
=======
private final String mResourcePath;
>>>>>>>
private final boolean mOneWorkerPerHost;
private... |
<<<<<<<
FileInfo fileInfo = sTFS.getFileStatus(-1, new TachyonURI("/testFile1"));
mInMemInputStream = new HdfsFileInputStream(sTFS, fileInfo.getFileId(),
new Path(fileInfo.getUfsPath()), new Configuration(), BUFFER_SIZE,
=======
ClientFileInfo fileInfo = sTFS.getFileStatus(-1, new TachyonURI("/tes... |
<<<<<<<
import tachyon.util.io.PathUtils;
=======
import tachyon.exception.NotFoundException;
import tachyon.util.CommonUtils;
>>>>>>>
import tachyon.util.io.PathUtils;
import tachyon.exception.NotFoundException; |
<<<<<<<
int bufferBytes = mTachyonConf.getInt(Constants.USER_FILE_BUFFER_BYTES, Constants.MB) * 4;
byte[] buffer = new byte[bufferBytes];
BlockOutStream bos = new BlockOutStream(this, WriteType.TRY_CACHE, blockIndex, mTachyonConf);
try {
int limit;
while (length > 0 && ((limit =... |
<<<<<<<
=======
// TODO(gene): Re-enable when metrics is fully implemented on the master.
/*
>>>>>>> |
<<<<<<<
public void emptyFile(long fileId) throws FileDoesNotExistException {
synchronized (mInodeTree) {
// free the file first
free(fileId, false);
InodeFile inodeFile = (InodeFile) mInodeTree.getInodeById(fileId);
inodeFile.reinit();
}
}
=======
/**
* MasterInodeTTL perio... |
<<<<<<<
import tachyon.worker.BlockWorkerClient;
=======
>>>>>>> |
<<<<<<<
/*
* Copyright (C) 2012-2017 52°North Initiative for Geospatial Open Source
=======
/**
* Copyright (C) 2012-2017 52°North Initiative for Geospatial Open Source
>>>>>>>
/*
* Copyright (C) 2012-2017 52°North Initiative for Geospatial Open Source
<<<<<<<
import org.hibernate.criterion.Criterion;
import org... |
<<<<<<<
* @param tachyonConf the {@link tachyon.conf.TachyonConf} instance.
* @return null for any unknown scheme.
=======
* @throws IllegalArgumentException for unknown scheme
* @return instance of the under layer file system
>>>>>>>
* @param tachyonConf the {@link tachyon.conf.TachyonConf} instance.... |
<<<<<<<
import org.n52.sos.ogc.sos.SosInsertionMetadata;
import org.n52.sos.request.DeleteSensorRequest;
import org.n52.sos.request.DescribeSensorRequest;
import org.n52.sos.request.InsertSensorRequest;
import org.n52.sos.request.UpdateSensorRequest;
=======
import org.n52.shetland.ogc.sos.SosInsertionMetadata;
impor... |
<<<<<<<
import alluxio.RuntimeConstants;
import alluxio.ValidateConf;
=======
import alluxio.cli.ValidateConf;
import alluxio.cli.Version;
>>>>>>>
import alluxio.RuntimeConstants;
import alluxio.cli.ValidateConf; |
<<<<<<<
import alluxio.wire.WorkerInfo;
import alluxio.wire.WorkerNetAddress;
=======
>>>>>>>
import alluxio.wire.WorkerInfo; |
<<<<<<<
mTachyonConf = Preconditions.checkNotNull(conf);
mUserId = userId;
=======
mTachyonConf = conf;
mSessionId = sessionId;
>>>>>>>
mTachyonConf = Preconditions.checkNotNull(conf);
mSessionId = sessionId; |
<<<<<<<
throws InvalidPathException {
// TODO(yupeng): add validation
=======
throws InvalidPathException, IOException {
>>>>>>>
throws InvalidPathException { |
<<<<<<<
public boolean addCheckpoint(long workerId, long fileId, long length, String checkpointPath)
=======
public List<Integer> workerGetPriorityDependencyList() {
return mFileSystemMaster.getPriorityDependencyList();
}
@Override
public boolean persistFile(long fileId, long length)
>>>>>>>
public ... |
<<<<<<<
import alluxio.underfs.UnderFileSystem;
import alluxio.underfs.UnderFileSystemConfiguration;
import alluxio.underfs.UnderFileSystemFactory;
import alluxio.underfs.UnderFileSystemFactoryRegistry;
import alluxio.underfs.local.LocalUnderFileSystem;
=======
import alluxio.underfs.ConfExpectingUnderFileSystemFacto... |
<<<<<<<
EvictionPlan plan = mEvictor.freeSpace(smallestCapacity, anyDirInFirstTier);
Assert.assertTrue(EvictorUtils.validCascadingPlan(smallestCapacity, plan, mMetaManager));
=======
EvictionPlan plan = mEvictor.freeSpaceWithView(smallestCapacity, anyDirInFirstTier,
mManagerView);
As... |
<<<<<<<
return ObservationStream.empty();
} else if (this.observationCollection == null) {
=======
return Collections.emptyList();
}
else if (this.observationCollection == null) {
>>>>>>>
return ObservationStream.empty();
}
else if (this.ob... |
<<<<<<<
* @param localFolder This TachyonWorker's local folder's path
* @param spaceLimitBytes The maximum memory space this TachyonWorker can use, in bytes
* @param tachyonConf The instance of {@link tachyon.conf.TachyonConf} to used by Worker.
=======
>>>>>>>
* @param tachyonConf The instance of {@link... |
<<<<<<<
public InodeDirectory getRoot() {
return mRoot;
}
=======
public List<Inode> createPath(TachyonURI path, long blockSizeBytes, boolean recursive,
boolean directory)
throws FileAlreadyExistException, BlockInfoException, InvalidPathException {
return createPath(path, blockSizeBytes... |
<<<<<<<
interface HasLocale {
String LOCALE = "locale";
Locale getLocale();
HasLocale setLocale(Locale locale);
boolean isSetLocale();
}
=======
interface HasSamplingGeometry {
String SAMPLING_GEOMETRY = "samplingGeometry";
Geomet... |
<<<<<<<
public static BlockOutStream createBlockOutStream(FileSystemContext context, long blockId,
long blockSize, WorkerNetAddress address, OutStreamOptions options) {
if (address.getHost().equals(NetworkAddressUtils.getClientHostName()) && Configuration
.getBoolean(PropertyKey.USER_SHORT_CIRCUIT_E... |
<<<<<<<
} else if (entry instanceof SetPinnedEntry) {
setPinnedFromEntry((SetPinnedEntry) entry);
=======
} else if (entry instanceof PersistFileEntry) {
persistFileFromEntry((PersistFileEntry) entry);
} else if (entry instanceof SetStateEntry) {
try {
setStateFromEntry((SetState... |
<<<<<<<
=======
} catch (TachyonTException e) {
throw TachyonException.from(e);
} catch (TException e) {
LOG.error(e.getMessage(), e);
mConnected = false;
>>>>>>>
<<<<<<<
=======
} catch (TachyonTException e) {
throw TachyonException.from(e);
} catch (TExcep... |
<<<<<<<
mRemoteWriter = RemoteBlockWriter.Factory.create(ClientContext.getConf());
mWorkerClient = mContext.acquireWorkerClient();
=======
mRemoteWriter = RemoteBlockWriter.Factory.createRemoteBlockWriter(ClientContext.getConf());
mBlockWorkerClient = mContext.acquireWorkerClient();
>>>>>>>
mRemo... |
<<<<<<<
public static final int JOURNAL_VERSION = 2;
// Configurations properties constants.
// Please check and update Configuration-Settings.md file when you change or add Tachyon
// configuration properties.
// This constant is being used only in Hadoop MR job submissions where client need to pass site
... |
<<<<<<<
conf.set(Constants.USER_FILE_WRITE_TYPE_DEFAULT, WriteType.CACHE_THROUGH.toString());
Whitebox.setInternalState(ClientContext.class, "sTachyonConf", conf);
=======
conf.set(Constants.USER_FILE_UNDER_STORAGE_TYPE_DEFAULT, ufsType.toString());
ClientContext.reset(conf);
>>>>>>>
conf.set(Con... |
<<<<<<<
import tachyon.proto.journal.Lineage.PersistFilesRequestEntry;
import tachyon.security.User;
import tachyon.security.authentication.PlainSaslServer;
import tachyon.security.authorization.FileSystemAction;
=======
>>>>>>>
import tachyon.security.User;
import tachyon.security.authentication.PlainSaslServer;
im... |
<<<<<<<
mBlockWorker = new DefaultBlockWorker(mBlockMasterClient, mFileSystemMasterClient, mSessions,
mBlockStore, new AtomicReference<>(10L), mUfsManager);
=======
mBlockWorker =
new DefaultBlockWorker(mBlockMasterClient, mFileSystemMasterClient, mSessions, mBlockStore);
>>>>>>>
mBlockWo... |
<<<<<<<
import tachyon.proto.journal.File.InodeFileEntry;
import tachyon.proto.journal.Journal.JournalEntry;
=======
import tachyon.master.file.journal.InodeFileEntry;
import tachyon.master.journal.JournalEntry;
import tachyon.security.authorization.FileSystemPermission;
import tachyon.security.authorization.Permissi... |
<<<<<<<
SocketAddress address, long sessionId, long id, long length, int tier,
Protocol.RequestType type) {
NettyPacketWriter packetWriter =
new NettyPacketWriter(context, address, id, length, sessionId, tier, type);
=======
InetSocketAddress address, long sessionId, long id, long length... |
<<<<<<<
throws FileAlreadyExistsException, FileDoesNotExistException, InvalidPathException,
IOException {
MasterContext.getMasterSource().incMountPathsOps(1);
=======
throws FileAlreadyExistsException, InvalidPathException, IOException {
>>>>>>>
throws FileAlreadyExistsException, InvalidP... |
<<<<<<<
=======
import alluxio.client.util.ClientTestUtils;
import alluxio.security.authorization.Permission;
>>>>>>>
import alluxio.security.authorization.Permission;
<<<<<<<
ConfigurationTestUtils.resetConfiguration();
=======
Assert.assertEquals(Permission.defaults().applyFileUMask(ClientContext.getCon... |
<<<<<<<
private void startCluster(String bindHost) throws Exception {
TachyonConf tachyonConf = new TachyonConf();
=======
private final void startCluster(String bindHost) throws Exception {
TachyonConf tachyonConf = MasterContext.getConf();
>>>>>>>
private void startCluster(String bindHost) throws Exc... |
<<<<<<<
final FileSystemMasterClient client =
new FileSystemMasterClient(localAlluxioClusterResource.get().getMaster().getAddress(),
localAlluxioClusterResource.getTestConf());
try {
CommonTestUtils.waitFor(uri + " to be persisted", new Function<Void, Boolean>() {
=======
try (Fi... |
<<<<<<<
LOG.info("Resolving {}", path);
=======
LOG.debug("Resolving " + path);
>>>>>>>
LOG.debug("Resolving {}", path); |
<<<<<<<
import alluxio.MasterStorageTierAssoc;
import alluxio.PropertyKey;
=======
import alluxio.Constants;
>>>>>>>
import alluxio.Constants;
import alluxio.PropertyKey;
<<<<<<<
private UnderFileSystem mockUfs() {
UnderFileSystem ufs =
PowerMockito.spy(UnderFileSystem.get(Configuration.get(PropertyKe... |
<<<<<<<
// mock block worker
BlockWorker blockWorker = Mockito.mock(BlockWorker.class);
FileInfo fileInfo = new FileInfo();
fileInfo.setPath("test");
Mockito.when(blockWorker.getFileInfo(fileId)).thenReturn(fileInfo);
BlockReader reader = Mockito.mock(BlockReader.class);
for (long blockId : ... |
<<<<<<<
public InodeEntry(long creationTimeMs, long id, String name, long parentId, boolean isPinned,
long lastModificationTimeMs, PermissionStatus ps) {
=======
public InodeEntry(long creationTimeMs, long id, String name, long parentId, boolean persisted,
boolean pinned, long lastModificationTimeMs) ... |
<<<<<<<
/**
* Get the block id by the file id and offset. it will check whether the file and the block exist.
*
* @param offset
* The offset of the file.
* @return the block id if exists
* @throws IOException
*/
long getBlockIdBasedOnOffset(long offset) throws IOException {
int ind... |
<<<<<<<
EvictionPlan plan = mEvictor.freeSpace(capacityBytes, dir.toBlockStoreLocation());
EvictorTestUtils.assertValidPlan(capacityBytes, plan, mMetaManager);
=======
EvictionPlan plan = mEvictor.freeSpaceWithView(
capacityBytes, dir.toBlockStoreLocation(), mManagerView);
EvictorTestUtils.ass... |
<<<<<<<
public void listenSameAddressTest() throws IOException {
startCluster(NetworkAddressUtils.getLocalHostName(100));
=======
public void listenSameAddressTest() throws Exception {
startCluster(NetworkUtils.getLocalHostName(100));
>>>>>>>
public void listenSameAddressTest() throws Exception {
s... |
<<<<<<<
traverseToInode(PathUtils.getPathComponents(path.toString()), LockMode.READ, null);
traversalResult.getInodeLockGroup().close();
=======
traverseToInode(PathUtils.getPathComponents(uri.getPath()), false);
>>>>>>>
traverseToInode(PathUtils.getPathComponents(uri.getPath()), ... |
<<<<<<<
TachyonURI checkpointPath) throws SuspectedFileSizeException, BlockInfoException,
FileDoesNotExistException {
// TODO(gene): metrics
=======
TachyonURI checkpointPath)
throws SuspectedFileSizeException, BlockInfoException, FileDoesNotExistException {
>>>>>>>
TachyonURI c... |
<<<<<<<
import org.junit.After;
=======
import org.apache.thrift.TException;
>>>>>>>
<<<<<<<
private LocalTachyonCluster mLocalTachyonCluster = null;
=======
@Rule
public LocalTachyonClusterResource mLocalTachyonClusterResource =
new LocalTachyonClusterResource(10000, 1000, 128);
private TachyonFS m... |
<<<<<<<
import javax.annotation.concurrent.NotThreadSafe;
=======
import com.google.common.base.Throwables;
>>>>>>>
import javax.annotation.concurrent.NotThreadSafe;
<<<<<<<
/** Logic for managing block store and under file system store. */
private final BlockDataManager mBlockDataManager;
=======
>>>>>... |
<<<<<<<
import org.uma.jmetal.measure.impl.CountingMeasure;
import org.uma.jmetal.measure.impl.DurationMeasure;
=======
>>>>>>> |
<<<<<<<
import org.uma.jmetal.util.pseudorandom.JMetalRandom;
=======
import org.uma.jmetal.util.errorchecking.JMetalException;
>>>>>>>
import org.uma.jmetal.util.errorchecking.JMetalException;
import org.uma.jmetal.util.pseudorandom.JMetalRandom; |
<<<<<<<
private String fileName_;
private int [][] a_matrix;
private int [][][] b_matrixs;
private int facilities_ = -1;
private int objectives_ = -1;
=======
private String fileName_; // name of the file containing the instance
private int[][] a_matrix; // ... |
<<<<<<<
_work = new double[_n][SORT_INDEX + 1]; // m=solID, m+1=solNewIndex
_nonDomEarlyDetection = 0;
=======
_work = new double[_n][SORT_INDEX + 1]; //m=solID, m+1=solNewIndex
>>>>>>>
_work = new double[_n][SORT_INDEX + 1]; // m=solID, m+1=solNewIndex
<<<<<<<
public final long getNumberOfEarlyD... |
<<<<<<<
=======
CategoricalParameterType variation = new CategoricalParameterType("variation");
variation.addValue(VariationType.crossoverAndMutationVariation.toString());
//variation.addValue(VariationType.DE.toString());
>>>>>>>
<<<<<<<
crossover.addSpecificParameter(new SBXCrossoverDistributionI... |
<<<<<<<
public interface LocalSearchOperator <Source extends Solution> extends Operator<Source, Source> {
public int getEvaluations();
=======
public interface LocalSearchOperator <Source extends Solution<?>> extends Operator<Source, Source> {
/**
* Returns the number of evaluations made by the local searc... |
<<<<<<<
final int[] terminations = ArrayUtils.toPrimitive(getTerminationsForMaturity(maturity).toArray(new Integer[0]));
final double[] values = new double[terminations.length];
=======
int[] terminations = getTerminationsForMaturity(maturity).stream().mapToInt(Integer::intValue).toArray();
double[] value... |
<<<<<<<
* @param referenceDate
* @param initialValue
* @param discountCurveForForwardRate
* @param discountCurveForDiscountRate
* @param volatility
* @param jumpIntensity
* @param jumpSizeMean
* @param jumpSizeStdDev
=======
*
* @param initialValue \( S_{0} \) - spot - initial value of S
* @para... |
<<<<<<<
final int[] terminations = ArrayUtils.toPrimitive(getTerminationsForMaturity(maturity).toArray(new Integer[0]));
final double[] values = new double[terminations.length];
=======
int[] terminations = getTerminationsForMaturity(maturity).stream().mapToInt(Integer::intValue).toArray();
double[] value... |
<<<<<<<
/*
* Copyright (C) 2012-2019 52°North Initiative for Geospatial Open Source
=======
/**
* Copyright (C) 2012-2020 52°North Initiative for Geospatial Open Source
>>>>>>>
/*
* Copyright (C) 2012-2020 52°North Initiative for Geospatial Open Source |
<<<<<<<
import java.lang.reflect.Member;
import java.lang.reflect.Method;
=======
import java.util.ArrayList;
import java.util.Collection;
>>>>>>>
import java.lang.reflect.Member;
import java.lang.reflect.Method;
import java.util.ArrayList;
import java.util.Collection;
<<<<<<<
* @param <T> The type of the inst... |
<<<<<<<
import io.grpc.NameResolverProvider;
import io.grpc.util.RoundRobinLoadBalancerFactory;
=======
>>>>>>>
import io.grpc.NameResolverProvider; |
<<<<<<<
import de.learnlib.api.MembershipOracle;
import de.learnlib.api.Query;
import net.automatalib.words.Word;
=======
import de.learnlib.api.MembershipOracle;
import de.learnlib.api.Query;
import net.automatalib.words.Word;
>>>>>>>
import java.util.ArrayList;
import java.util.Collection;
import java.util.List;
... |
<<<<<<<
ReuseCapableOracleFactory<S, I, O> factory,
boolean invalidateSystemstates) {
=======
ReuseCapableOracle<S, I, O> sul) {
>>>>>>>
ReuseCapableOracleFactory<S, I, O> factory) {
<<<<<<<
this.factory = factory;
this.invalidateSystemstates = invalidateSystemstates;
=======
this.sul = s... |
<<<<<<<
LauncherSettings.Settings.call(getContentResolver(),
LauncherSettings.Settings.METHOD_CLEAR_EMPTY_DB_FLAG);
LauncherClings.synchonouslyMarkFirstRunClingDismissed(this);
=======
LauncherAppState.getLauncherProvider().clearFlagEmptyDbCreated();
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.