Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,14 @@
import java.nio.charset.Charset;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Date;
import java.util.List;
import java.util.concurrent.atomic.AtomicBoolean;
import java.util.concurrent.atomic.AtomicInteger;
import java.io.InputStream;

import java.sql.Timestamp;
import java.text.SimpleDateFormat;

import javax.net.SocketFactory;
import javax.net.ssl.SSLSocket;
Expand Down Expand Up @@ -1056,6 +1058,9 @@ private int startFetch()
if (this.simulateFail) this.handle = -1;
readAheadRequest = (this.forceTokenUse) ? this.makeTokenRequest(readRequestSpan) : this.makeHandleRequest(readRequestSpan);

String timeStamp = new SimpleDateFormat("yyyy.MM.dd.HH.mm.ss").format(new Date());
System.out.println( timeStamp + " Token request: " + readAheadRequest + "\n\n");

try
{
int requestLen = readAheadRequest.length();
Expand Down Expand Up @@ -1135,6 +1140,10 @@ private int startFetch()
inTokenRetry = true;

String retryTrans = this.makeTokenRequest(readRequestSpan);

String timeStamp = new SimpleDateFormat("yyyy.MM.dd.HH.mm.ss").format(new Date());
System.out.println( timeStamp + " Token request: " + retryTrans + "\n\n");

int len = retryTrans.length();
try
{
Expand Down Expand Up @@ -1354,6 +1363,9 @@ private void finishFetch()
if (this.simulateFail) this.handle = -1;
String readAheadRequest = (this.forceTokenUse) ? this.makeTokenRequest(readRequestSpan) : this.makeHandleRequest(readRequestSpan);

String timeStamp = new SimpleDateFormat("yyyy.MM.dd.HH.mm.ss").format(new Date());
System.out.println( timeStamp + " Continue request: " + readAheadRequest + "\n\n");

try
{
int requestLen = readAheadRequest.length();
Expand Down Expand Up @@ -1917,6 +1929,10 @@ private void makeActive() throws HpccFileException
try
{
String msg = makeGetVersionRequest(versionSpan);

String timeStamp = new SimpleDateFormat("yyyy.MM.dd.HH.mm.ss").format(new Date());
System.out.println( timeStamp + " Version request: " + msg + "\n\n");

int msgLen = msg.length();

this.dos.writeInt(msgLen);
Expand Down Expand Up @@ -1984,10 +2000,16 @@ private void makeActive() throws HpccFileException
{
this.tokenBin = new byte[0];
readTrans = makeInitialRequest(readRequestSpan);

String timeStamp = new SimpleDateFormat("yyyy.MM.dd.HH.mm.ss").format(new Date());
System.out.println( timeStamp + " Initial request: " + readTrans + "\n\n");
}
else
{
readTrans = makeTokenRequest(readRequestSpan);

String timeStamp = new SimpleDateFormat("yyyy.MM.dd.HH.mm.ss").format(new Date());
System.out.println( timeStamp + " Token request: " + readTrans + "\n\n");
}

int transLen = readTrans.length();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,6 @@ public class DFSReadWriteTest extends BaseRemoteTest
private static final Version newProtocolVersion = new Version(8,12,10);


@Test
public void readBadlyDistributedFileTest() throws Exception
{
//this file only has data on two nodes
Expand All @@ -83,7 +82,6 @@ public void readBadlyDistributedFileTest() throws Exception
assertEquals("Not all records loaded",expectedCounts[1], records.size());
}

@Test
public void readWithForcedTimeoutTest() throws Exception
{
HPCCFile file = new HPCCFile(datasets[0], connString , hpccUser, hpccPass);
Expand All @@ -93,7 +91,6 @@ public void readWithForcedTimeoutTest() throws Exception
assertEquals("Not all records loaded",expectedCounts[0], records.size());
}

@Test
public void nullCharTests() throws Exception
{
// Unicode
Expand Down Expand Up @@ -209,7 +206,6 @@ public void nullCharTests() throws Exception
assertTrue("Single byte EOS character test failed. See mismatches above.", sbcPassed);
}

@Test
public void longNullTerminatedStringTest() throws Exception
{
Object[] fields = new Object[1];
Expand All @@ -235,7 +231,6 @@ public void longNullTerminatedStringTest() throws Exception
assertEquals(record, readRecord);
}

@Test
public void integrationReadWriteBackTest() throws Exception
{
for (int i = 0; i < datasets.length; i++)
Expand Down Expand Up @@ -282,7 +277,6 @@ public void integrationReadWriteBackTest() throws Exception
}
}

@Test
public void readBufferResizeTest() throws Exception
{
HPCCFile file = new HPCCFile(datasets[0], connString , hpccUser, hpccPass);
Expand Down Expand Up @@ -472,7 +466,6 @@ else if (field instanceof List)
}
}

@Test
public void nullElementTests()
{
FieldDef[] stringSetElemFD = new FieldDef[1];
Expand Down Expand Up @@ -537,7 +530,6 @@ public void nullElementTests()
writeFile(records, "null::element::test", recordDef, connTO);
}

@Test
public void getMetadataTest() throws Exception
{
String fname = datasets[0];
Expand All @@ -548,7 +540,6 @@ public void getMetadataTest() throws Exception
assertEquals(expectedCounts[0],Long.valueOf(meta.getRecordCountInt64()).intValue());
}

@Test
public void getNullMetadataTest() throws Exception
{
HPCCFile file=new HPCCFile("notthere",connString,hpccUser,hpccPass);
Expand All @@ -575,7 +566,6 @@ public static String generateRandomString(int count)
return sb.toString();
}

@Test
public void integrationLargeRecordTest() throws Exception
{
// Create a large record dataset
Expand Down Expand Up @@ -615,7 +605,6 @@ public void integrationLargeRecordTest() throws Exception
}
}

@Test
public void unsigned8ToDecimalTest() throws Exception
{
// Create a large record dataset
Expand Down Expand Up @@ -655,7 +644,6 @@ public void unsigned8ToDecimalTest() throws Exception
}
}

@Test
public void longStringTest() throws Exception
{
// Create a large record dataset
Expand Down Expand Up @@ -696,7 +684,6 @@ public void longStringTest() throws Exception
}
}

@Test
public void numericOverflowTest() throws Exception
{
// Create a large record dataset
Expand Down Expand Up @@ -818,7 +805,6 @@ public void numericOverflowTest() throws Exception
}

final static String dimdatefilename = "dfsclient::junit::dim_date";
@Test
public void filteredDIMDATEJAPI445Test() throws Exception
{
List<HPCCRecord> records = new ArrayList<HPCCRecord>();
Expand Down Expand Up @@ -910,7 +896,6 @@ record = new HPCCRecord(fields, recordDef);
}
}

@Test
public void filteredTest() throws Exception
{
// Create a large record dataset
Expand Down Expand Up @@ -940,7 +925,6 @@ public void filteredTest() throws Exception
}
}

@Test
public void stringProcesingTests() throws Exception
{
String whiteSpaceStr = " \t\n\r\f"
Expand Down Expand Up @@ -1018,7 +1002,6 @@ public void stringProcesingTests() throws Exception
}
}

@Test
public void stringEOSTests() throws Exception
{
FieldDef[] fieldDefs = new FieldDef[9];
Expand Down Expand Up @@ -1062,7 +1045,6 @@ public void stringEOSTests() throws Exception
}
}

@Test
public void resumeFileReadTest() throws Exception
{
HPCCFile file = new HPCCFile("benchmark::integer::20kb", connString , hpccUser, hpccPass);
Expand Down Expand Up @@ -1185,7 +1167,6 @@ public void resumeFileReadTest() throws Exception
}
}

@Test
public void protocolVersionTest()
{
HPCCWsDFUClient dfuClient = wsclient.getWsDFUClient();
Expand Down Expand Up @@ -1249,7 +1230,6 @@ public void emptyCompressedFileTest()
}
}

@Test
public void filePartReadRetryTest()
{
{
Expand Down Expand Up @@ -1296,7 +1276,6 @@ public void filePartReadRetryTest()
}
}

@Test
public void invalidSignatureTest()
{

Expand Down Expand Up @@ -1376,7 +1355,6 @@ public void invalidSignatureTest()
}
}

@Test
public void earlyCloseTest() throws Exception
{
HPCCFile file = new HPCCFile(datasets[0], connString , hpccUser, hpccPass);
Expand Down
Loading