|
|
@ -383,10 +383,45 @@ namespace PartitionFileStorageTest
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private static void FaultUncompressedReadTest(string filePath)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
var serializer = new StoreStandartSerializer<ulong, ulong, byte[]>();
|
|
|
|
|
|
|
|
// 1 build index
|
|
|
|
|
|
|
|
var dict = new Dictionary<ulong, HashSet<ulong>>();
|
|
|
|
|
|
|
|
using (var reader = new MemoryStreamReader(new FileStream(filePath, FileMode.Open, FileAccess.Read, FileShare.None, 4096 * 1024)))
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
while (reader.EOS == false)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
try
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
var key = serializer.KeyDeserializer.Invoke(reader);
|
|
|
|
|
|
|
|
if (false == dict.ContainsKey(key))
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
dict[key] = new HashSet<ulong>();
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
if (reader.EOS)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
var input = serializer.InputDeserializer.Invoke(reader);
|
|
|
|
|
|
|
|
dict[key].Add(input);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
catch (Exception ex)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
static void Main(string[] args)
|
|
|
|
static void Main(string[] args)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
/*FaultIndexTest(@"H:\temp\85");
|
|
|
|
/*FaultIndexTest(@"H:\temp\85");
|
|
|
|
return;*/
|
|
|
|
return;*/
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
|
|
|
FaultUncompressedReadTest(@"H:\temp\107");
|
|
|
|
|
|
|
|
return;
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
var root = @"H:\temp";
|
|
|
|
var root = @"H:\temp";
|
|
|
|
var options = new StoreOptions<ulong, ulong, byte[], Metadata>
|
|
|
|
var options = new StoreOptions<ulong, ulong, byte[], Metadata>
|
|
|
@ -446,9 +481,10 @@ namespace PartitionFileStorageTest
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// FastTest(options);
|
|
|
|
// FastTest(options);
|
|
|
|
FSUtils.CleanAndTestFolder(root);
|
|
|
|
/* FSUtils.CleanAndTestFolder(root);
|
|
|
|
|
|
|
|
FullStoreMultithreadTest(optionsMultiThread, pairs);*/
|
|
|
|
|
|
|
|
|
|
|
|
FullStoreMultithreadTest(optionsMultiThread, pairs);
|
|
|
|
FSUtils.CleanAndTestFolder(root);
|
|
|
|
FullStoreTest(options, pairs);
|
|
|
|
FullStoreTest(options, pairs);
|
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
/*
|
|
|
|