Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HPCC4J-551 HPCCFile Make TLK Use Optional #655

Merged
merged 1 commit into from
Nov 1, 2023
Merged
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
28 changes: 28 additions & 0 deletions dfsclient/src/main/java/org/hpccsystems/dfs/client/HPCCFile.java
Original file line number Diff line number Diff line change
Expand Up @@ -318,6 +318,34 @@ public HPCCFile setClusterRemapInfo(RemapInfo remapinfo)
return this;
}

/**
* Get the value of useTLK option
*
* @return a boolean value indicating use of the TLK to filter index file reads
*/
public boolean getUseTLK()
{
return this.useTLK;
}

/**
* Sets the useTLK option.
* Note: the value must be set before querying any data from the file, including record definition information.
*
* @param useTLK should the TLK be used to filter index file reads
*
* @return this HPCCFile
*/
public HPCCFile setUseTLK(boolean useTLK)
{
this.useTLK = useTLK;

// Force the data parts to be re-created
this.dataParts = null;

return this;
}

/**
* Gets the filter.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -230,11 +230,8 @@ public void tlkBypassTest() throws Exception
// Read index ignoring TLK and check that all partitions are returned
//------------------------------------------------------------------------------

Connection espConn = new Connection(connString);
espConn.setUserName(hpccUser);
espConn.setPassword(hpccPass);

HPCCFile file = new HPCCFile("~test::index::integer::key", espConn, "", "", new RemapInfo(), 0, "", false);
HPCCFile file = new HPCCFile("~test::index::integer::key", connString , hpccUser, hpccPass);
file.setUseTLK(false);
DataPartition[] dataParts = file.getFileParts();

Long searchValue = 3L;
Expand Down
Loading