Skip to content

Commit 185e02c

Browse files
sumwaleSumedh Wale
andauthored
Native C++ driver updates and some fixes (#566)
- update oracle ojdbc6 version: switch to a non-deprecated version available in maven central - update thrift 0.14.1 and regenerate thrift layer - update boost to 1.76.0 and googletest to 0.10.0 - changed boost::shared_ptr and other smart pointers to C++11 std::shared_ptr throughout (also thrift uses the std counterparts now instead of boost) - likewise changed boost thread to std thread except for boost::shared_mutex which is not available in C++11 - removed ArrayList which uses a risky realloc for expansion that will cause trouble for classes having a non-trivial default constructor (the gcc compiler now complains about it too); switched to std::vector instead - removed the placement new strategy used to convert thrift::Row to Row/UpdatableRow/Parameters (which depended on a specialized ArrayList constructor to avoid touching the array inside) and instead use move constructors to move data from thrift::Row to the child classes; while this has the overhead of having to create child class objects, overall it is much safer and overhead is negligible in comparison to the cost of reading+creating the thrift::Row objects from the socket stream - due to above change, the set of rows in ResultSet are now created using move upfront from thrift::Row vector and the iterator uses the same instead of using placement new to covert on-the-fly which is cleaner too since the earlier strategy can lead to placement new being done multiple times for the same thrift::Row for scrollable cursors - changed ParametersBatch API to "moveParameters" and existing Parameters list to the end of batch instead of having to use the awkward "createParameters" approach - added reserve, batchSize and parametersAt methods to ParametersBatch - ResultSets inside Result now use shared_ptrs to avoid creating them on-the-fly everytime - use std::move in places like serialization/deserialization to reduce copy - removed ununsed ThreadSafeList and added note about adding move semantics support in ThreadSafeMap in the future - reduced unnecessary copies in ControlConnection and other classes by switching over to use move operations - use std::make_shared for shared_ptr creation throughout (except for nullptr) - changed NULL to nullptr throughout and NULL equality checks by simple boolean checks - correct SnappyDataInc github links to point to TIBCOSoftware instead - updated eclipse CDT configuration files to the latest CDT 10.2.0 version - fix heap overflow shown by AddressSanitizer (missing null termination in LOG_LEVELS) - fix vector constructor taking size in C++11 that is not initial capacity rather size with default values itself, so change to use reserve() - use foreach loop instead of explicit iterator - removed some code repitition in UTF8<->UTF16 conversions - changed single character append to a string to use push_back - update copyright year - allow for default constructor and assignment for ConnectionPropery - added appendString and appendBinary methods to Parameter that will either append to string/binary if an existing value is present else set it; this will be used for more efficient imeplementation of SQLPutData - adding password entry generator utility to ldap-test-server; also added --port option also updated auth.ldif with entries used by ODBC tests - added "default-schema" property to connection - fixes few potential memory leaks in case of exceptions as reported by AddressSanitizer - updated eclipse build to use AddressSanitizer by default for release builds both in compilation and linking, removed the same in debug builds else debugger becomes very slow, switched to system installed boost library - switch to using std::function instead of template TPROC method arguments and move those functions from headers to implementation (since no template arguments, so better to have implementation separately instead of force inlining those large methods) - reviewed all classes and either mark them as "final" or else mark their destructors as virtual - changed individual exception handling using Utils::handleExceptionInDestructor with a common Utils::handleExceptionsInDestructor that is now passed an std::function having the actual body of the destructor - mark few methods as "noexcept" which are never supposed to throw exceptions (and ensure that no exceptions are thrown) - code duplication: removed some of the methods in Utils used for logging like toStream() to instead use Utils::toString() methods with move semantics if required for efficiency - fix AQP property handling in ClientService - correct operation name sent to exception messages in ClientService::bulkClose - Print process and library base addresses in stack traces. The addresses shown in SQLException::printStackTrace cannot be translated to code file and line number without the process/library base address where it was loaded. - Added code in SQLException to determine the bases addresses for current executable and snappyodbc library using /proc/self/maps in "staticInitialize" and add the message to SQLException::printStackTrace - removed transparent failover in ClientService since it fails in some situation and does not restore any session properties or default schema set on the previous connection - added custom override for operator== in HostAddress so that it compares equal just based on either ipAddress+port or hostName+port like in HostAddress.java; specifically the difference in serverType field currently causes the comparison to always fail leading to creating of a separate ControlConnection for every ClientService - set isCurrent flag in HostAddress and use the same for early comparison to handle cases where server sends back only the IP address filled in which does not match with the host name provided in the driver connect - overall simplified exception handling in ClientService to make it uniform - maintain a reference to SSLSocketFactory in ClientService and ControlConnection so that it outlives the SSL connections (THRIFT-4164) - added a GlobalConnectionHolder in ControlConnection whose global destructor sets the TSSLSocketFactory::setInExit(true) flag so that SSL_shutdown does not cause unexpected crashes in Windows during application teardown - use a map to shared_ptr of ControlConnection in GlobalConnectionHolder for each ClientService so that the ControlConnection gets automatically cleaned up when all its ClientServices are closed/destroyed - load-balance now works fine with above changes, so switch tests to use port 1527 - correct indentation/spacing in NetConnection.h/NetConnection.cpp - updated remaining dependencies: boost => 1.76.0, openssl => 1.1.1k - fix build on windows with VS2019 - fix SSLParameters handling with std::function that ends up making a copy when used via the functor defined in SSLParameters; now using an inline lambda closure instead of the functor in SSLParameters - moved SSLParameters inside SSLSocketFactory to avoid repeated copying and for proper ownership instead of strewing across - corrected passing of "failure" argument during initial connection creation to append the real cause to it so it is shown in exception message - allow for the truststore property to either point to a PEM file or a directory having a bunch of them (initialized using OpenSSL's c_rehash) - fix global destructor teardown order to ensure that the statics in TSSLSocketFactory are always alive when GlobalConnectionHolder's destructor is invoked; this is ensured by encapsulating the global static of GlobalConnectionHolder inside a method - [gradle] add proper output dirs to extractDependencies so that it only executes if a downloadDependencies has re-executed else it will be UP-TO-DATE - changed insert+pair to emplace in std map/unordered_map - add "Caused by:" in the SQLException printStackTrace if there is a nextException; ensure that process/library address is printed once - Provide password encryption including for SSL keystores, enabled by setting "encrypted-passwords=true". The password field is then assumed to be the target name to be looked up in system credential manager to obtain the password. - On Windows this uses the standard CredRead() API with type as CRED_TYPE_GENERIC so user must add the password under that heading. On Mac OSX the "security" tool is used to lookup the password for the given value as provided in the password field. On Linux and other systems, the "secret-tool" is used to lookup the password with the password field split on the first ':' to obtain the attribute and its value. - updated project files for VS2019 with corrected header/source file list - more changes for C++11 including fixes for many VS2019 source analysis warnings (noexcept additions for move constructors, virtual/final additions etc) - when no explicit truststore has been specified, then load system installed OpenSSL trusted certificate bundles searching in the usual install locations on Windows, Linux and Mac - check VTIs for authorization before failing: queries on VTIs were failing when authorization is on, so check in DataDictionary before failing if storage region is not found - convert connection failures to 08001/08004 rather than the non-standard X0Z01 - added Connection::toString() that returns connection ID with server - carry through the cause of failure during retries - enhanced DatabaseMetaData with a couple of ResultSet methods - added search for system certificates in product installation directory if it fails in standard paths (and no explicit truststore is specified) - added a global initializeSnappyDataService() method to find the product directory easily (identical to ClientService::staticInitialize) - changed the encrypted-passwords property to the more appropriate credential-manager - updated build scripts to add support for PopOS and Arch/Manajaro/Garuda using a new set of binaries - pass through the cause as a SQLException having SQLState/errorCode etc and added copy/move equality operators for passing the thrown exception to failoverExhausted - Newer gdb+gcc releases are terribly slow with "-g3" at least with the C++ driver for some unknown reason so switching it to "-g" for both gradle and eclipse. The "-g3" supposedly adds more information for macros which might be causing t rouble with the complicated boost macros. Not important anyway. - updated gradle to 5.6.4; also modified build.gradle a bit to enable inclusion as a sub-project (e.g. of ODBC layer) - corrected relative path of SSL certificate installed with the product - improved error message for credential manager lookup failures - enabled many additional warning flags with g++ which showed some issues that are fixed - many other changes to deal with warnings that now show as errors (-Werror) - added precompiled headers (pch.h) that reduces compilation times by ~30% - moved implementation header files from cpp/impl and cpp/thrift to headers/impl - switch back to hostname-only for sockets for now; specifically required for SSL that does hostname verification in the certificate - removed isCurrent checking from HostAddress hash method because this is incorrect in general (when the HostAddresses belong to two different clusters); instead take care of it in ClientService+ControlConnection to go through and pick up the HostAddress marked "isCurrent" if none of the existing ones match - removed IP address fillup code in DNSCacheService using hostName because it is incorrect for different kinds of IPv6 addresses (should use inet_pton/getaddrinfo) - some more reorganization of header for faster compile times - added implementation of cancellation of statement in C++ driver though server-side does not support yet for Spark routed queries - added code to split SQLException messages into records of given size; the records are created by splitting on newline, tab and spaces preferred in that order searching from end of designated record size; this is to be used by ODBC layer for SQLGetDiagRec/SQLGetDiagField because individual records have a size limit of 512 characters (probably coming from ancient times) - avoid injecting SQLState=X0Z35 which is server-side stack trace indicator and instead copy the SQLState/severity from the previous SQLException in the chain - compressed SQLException message causes a bit to avoid unnecessary repetitions caused by repeated copying from "causes" etc - in exception throw after failover too fails, don't keep the cause inside a top-level new exception rather keep the original cause as top-level while failover failure information is appended to the same - renamed SSL protocol names to be SSLv3, TLSv1.0 etc to match that in java - refactored property handling in ClientService constructor and improved error messages - minor improvement in credential-manager lookup failure messages - removed SSL_MODES and made the property as boolean with default as false - added an "auto-reconnect" property though not implemented yet Implementation of auto-reconnect - try to create the connection again before most operations if it failed previously due to server/network failure (isolation-level should be NONE to ensure that its not middle of transaction except for beginTransaction operation itself which skips that check) - reconnection is never attempted for some operations like commit/rollback/closeResultSet - changed ClientService::m_lock to recursive_mutex since reconnection check and the call to openConnection - avoid recursive_mutex for individual calls in ClientService and instead send a flag to openConnection that will skip the locking if it is already acquired (for the calls from reconnectionToServerIfRequired) - skip SERVER_STACK (X0Z35) in SQLException.fillRecords - if "includeStackTrace" is false then also skip server-side stack traces - added log-level=fine; to be used by ODBC layer to print stack traces but avoid printing lots of stuff to log-file like log-level=debug would do - minor fixes to correct warnings (treated as errors) in windows build - updated windows build files - retain path starting from "src/" to avoid unnecessarily exposing internal filenames (though full paths will still be embedded in the DLLs) - added .clang-format for expected formatting - upgraded solutions to VS2019 - removed calls to TSSLSocketFactory::setInExit() which handled in thrift library itself now - added explicit call to cleanupOpenSSL() to mark OpenSSL as uninitialized in the thrift TSSLSocket layer which will skip calls to SSL_shutdown (due to cleanup of objects that have not been explicitly closed during program teardown) - renamed "product" build task to clientProduct so that calls to the product task from snappy-odbc do not automatically invoke this product target too - cleaned up exception handling; use C++11 features - add retries to all the available servers in openConnection (and consequently for auto-reconnect too) - completely removed code related to failover in other places - more updates to C++11 code - update shadow plugin - set off-heap system variables before GemFireXD boot else some statics may get set incorrectly - C++ driver: deal with full name starting with a dot (empty schema) - fixing bunch of test failures - updates to TIBCO branding; changed deprecated gradle options - fix occasional test failures due to previous test suite artifacts - fix occasional failure in TransactionDUnit - remove some flags that cause binary incompatibility even across minor VS version changes Avoid appending IP address to hostname-for-clients - causes trouble if client-address is 0.0.0.0 for example - will also be a problem if exposed hostname is different from the bound IP address for clients (e.g. former is public hostname visible to clients while latter is an internal IP address only used by servers behind firewalls) Co-authored-by: Sumedh Wale <swale@tibco.com>
1 parent 574658d commit 185e02c

246 files changed

Lines changed: 8886 additions & 6467 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

build.gradle

Lines changed: 24 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ buildscript {
2323
}
2424
dependencies {
2525
classpath 'gradle.plugin.ca.coglinc2:javacc-gradle-plugin:3.0.0'
26-
classpath 'com.github.jengelman.gradle.plugins:shadow:4.0.3'
26+
classpath 'com.github.jengelman.gradle.plugins:shadow:5.2.0'
2727
classpath 'de.undercouch:gradle-download-task:3.4.3'
2828
}
2929
}
@@ -322,6 +322,11 @@ task cleanReports { doLast {
322322

323323

324324
subprojects {
325+
326+
int maxWorkers = project.hasProperty('org.gradle.workers.max') ?
327+
project.property('org.gradle.workers.max') as int :
328+
Runtime.getRuntime().availableProcessors()
329+
325330
// apply compiler options
326331
compileJava.options.encoding = 'UTF-8'
327332

@@ -348,16 +353,18 @@ subprojects {
348353
// Here we want to disable all transitive dependencies on external artifacts. This
349354
// allows us to lock down library versions. However, we want project dependencies to
350355
// be transitive such that the libraries of a dependent project are automatically included.
351-
configurations.all {
352-
dependencies.all { dep ->
353-
if (dep instanceof ModuleDependency && !(dep instanceof ProjectDependency)) {
354-
dep.transitive = false
356+
configurations.all { conf ->
357+
if (!conf.name.startsWith('test')) {
358+
dependencies.all { dep ->
359+
if (dep instanceof ModuleDependency && !(dep instanceof ProjectDependency)) {
360+
dep.transitive = false
361+
}
362+
}
363+
resolutionStrategy {
364+
// fail eagerly on version conflict (includes transitive dependencies)
365+
// e.g. multiple different versions of the same dependency (group and name are equal)
366+
failOnVersionConflict()
355367
}
356-
}
357-
resolutionStrategy {
358-
// fail eagerly on version conflict (includes transitive dependencies)
359-
// e.g. multiple different versions of the same dependency (group and name are equal)
360-
failOnVersionConflict()
361368
}
362369
}
363370

@@ -384,7 +391,7 @@ subprojects {
384391

385392
test {
386393
dependsOn "${subprojectBase}storeProduct"
387-
maxParallelForks = Runtime.getRuntime().availableProcessors()
394+
maxParallelForks = maxWorkers
388395
minHeapSize = '1g'
389396
maxHeapSize = '1g'
390397

@@ -421,7 +428,7 @@ subprojects {
421428
if (rootProject.name == 'snappy-store') {
422429
task dunitTest(type:Test) {
423430
dependsOn "${subprojectBase}storeProduct"
424-
maxParallelForks = Math.max((int)Math.sqrt(Runtime.getRuntime().availableProcessors() + 1) + 1, 2)
431+
maxParallelForks = Math.max(Math.sqrt(maxWorkers + 1) + 1 as int, 2)
425432
minHeapSize = '2g'
426433
maxHeapSize = '2g'
427434

@@ -456,7 +463,7 @@ subprojects {
456463
} else {
457464
tasks.named('dunitTest').configure {
458465
dependsOn "${subprojectBase}storeProduct"
459-
maxParallelForks = Math.max((int)Math.sqrt(Runtime.getRuntime().availableProcessors() + 1) + 1, 2)
466+
maxParallelForks = Math.max(Math.sqrt(maxWorkers + 1) + 1 as int, 2)
460467
minHeapSize = '2g'
461468
maxHeapSize = '2g'
462469

@@ -473,7 +480,7 @@ subprojects {
473480

474481
task wanTest(type:Test) {
475482
dependsOn "${subprojectBase}storeProduct"
476-
maxParallelForks = (int)Math.sqrt(Runtime.getRuntime().availableProcessors() + 1)
483+
maxParallelForks = Math.sqrt(maxWorkers + 1) as int
477484
minHeapSize = '1g'
478485
maxHeapSize = '1g'
479486

@@ -503,7 +510,7 @@ subprojects {
503510

504511
task integrationTest(type:Test) {
505512
dependsOn "${subprojectBase}storeProduct"
506-
maxParallelForks = Runtime.getRuntime().availableProcessors()
513+
maxParallelForks = maxWorkers
507514

508515
includes.clear()
509516

@@ -527,6 +534,7 @@ subprojects {
527534
test.dependsOn subprojectBase + 'cleanTestOutput'
528535
dunitTest.dependsOn subprojectBase + 'cleanDUnitOutput'
529536
wanTest.dependsOn subprojectBase + 'cleanWanOutput'
537+
wanTest.mustRunAfter dunitTest
530538
integrationTest.dependsOn subprojectBase + 'cleanIntegrationOutput'
531539
check.dependsOn.clear()
532540
check.dependsOn test, dunitTest, wanTest
@@ -575,7 +583,7 @@ subprojects {
575583
packaging 'jar'
576584
// optionally artifactId can be defined here
577585
description 'SnappyData store based off Pivotal GemFireXD'
578-
url 'http://www.snappydata.io'
586+
url 'https://github.com/TIBCOSoftware/snappydata'
579587

580588
scm {
581589
connection 'scm:git:https://github.com/TIBCOSoftware/snappy-store.git'

filehdr-mod.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*
2-
* Changes for TIBCO ComputeDB data platform.
2+
* Changes for TIBCO Project SnappyData data platform.
33
*
4-
* Portions Copyright (c) 2017-2019 TIBCO Software Inc. All rights reserved.
4+
* Portions Copyright (c) 2017-2021 TIBCO Software Inc. All rights reserved.
55
*
66
* Licensed under the Apache License, Version 2.0 (the "License"); you
77
* may not use this file except in compliance with the License. You

filehdr.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2017-2019 TIBCO Software Inc. All rights reserved.
2+
* Copyright (c) 2017-2021 TIBCO Software Inc. All rights reserved.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License"); you
55
* may not use this file except in compliance with the License. You

gemfire-core/src/main/java/com/gemstone/gemfire/internal/Banner.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ private static void print(PrintWriter out, String args[]) {
7878

7979
out.println(SEPERATOR);
8080
out.println();
81-
out.println(" Copyright (c) 2017-2019 TIBCO Software Inc. All rights reserved.");
81+
out.println(" Copyright (c) 2017-2021 TIBCO Software Inc. All rights reserved.");
8282
out.println();
8383
out.println(" Licensed under the Apache License, Version 2.0 (the \"License\"); you");
8484
out.println(" may not use this file except in compliance with the License. You");

gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/AbstractRegionEntry.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3092,7 +3092,7 @@ public boolean isOffHeap() {
30923092
@Override
30933093
@Retained
30943094
public Object _getValueRetain(RegionEntryContext context, boolean decompress) {
3095-
if (decompress) {
3095+
if (context != null && decompress) {
30963096
return decompress(context, _getValue());
30973097
} else {
30983098
return _getValue();

gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/ColocationHelper.java

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -229,6 +229,11 @@ public static boolean checkMembersColocation(PartitionedRegion partitionedRegion
229229
//We don't need a hostname because the equals method doesn't check it.
230230
for(PartitionRegionConfig config: colocatedRegions) {
231231
if(config.isColocationComplete() && !config.containsMember(member)) {
232+
if (partitionedRegion.getLogWriterI18n().fineEnabled()) {
233+
partitionedRegion.getLogWriterI18n().fine("checkMembersColocation for " +
234+
partitionedRegion.getFullPath() + ": colocation not complete for " +
235+
config.getFullPath());
236+
}
232237
return false;
233238
}
234239
}
@@ -270,6 +275,12 @@ private static boolean hasOfflineColocatedChildRegions(PartitionedRegion region)
270275

271276
if(childRegion == null || !childRegion.isAfterBucketMetadataSetup()) {
272277
//If the child region is offline, return true
278+
if (region.getLogWriterI18n().fineEnabled()) {
279+
region.getLogWriterI18n().fine("hasOfflineColocatedChildRegions for " +
280+
region.getFullPath() + ": child " + childName + " is offline " +
281+
(childRegion == null ? "(child region is null)"
282+
: "(child has not finished bucket initialization)"));
283+
}
273284
return true;
274285
} else {
275286
//Otherwise, look for offline children of that region.

gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/GemFireCacheImpl.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2948,6 +2948,8 @@ public void close(String reason, Throwable systemFailureCause, boolean keepalive
29482948
CacheLifecycleListener listener = (CacheLifecycleListener) iter.next();
29492949
listener.cacheClosed(this);
29502950
}
2951+
2952+
CacheObserverHolder.setInstance(null);
29512953
} // static synchronization on GemFireCache.class
29522954
}
29532955

gemfirexd/client/src/main/java/io/snappydata/thrift/internal/ClientDBMetaData.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2278,7 +2278,7 @@ public String getURL() throws SQLException {
22782278
*/
22792279
@Override
22802280
public String getUserName() throws SQLException {
2281-
return this.service.connArgs.getUserName();
2281+
return this.service.getUserName();
22822282
}
22832283

22842284
/**

gemfirexd/client/src/main/java/io/snappydata/thrift/internal/ClientService.java

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ public final class ClientService extends ReentrantLock implements LobService {
7474
private HostConnection currentHostConnection;
7575
private HostAddress currentHostAddress;
7676
private String currentDefaultSchema;
77-
final OpenConnectionArgs connArgs;
77+
private final OpenConnectionArgs connArgs;
7878
final Map<String, String> connectionProps;
7979
final List<HostAddress> connHosts;
8080
private boolean loadBalance;
@@ -596,6 +596,10 @@ public final String getCurrentDefaultSchema() {
596596
return this.currentDefaultSchema;
597597
}
598598

599+
public final String getUserName() {
600+
return this.connArgs.getUserName();
601+
}
602+
599603
final void setTXFlag(TransactionAttribute txFlag, boolean val) {
600604
this.txFlags[txFlag.ordinal()] = val ? (byte)1 : -1;
601605
}
@@ -2276,13 +2280,9 @@ public void cancelStatement(final HostConnection source, long stmtId)
22762280

22772281
// create a new connection to fire cancel since original statement
22782282
// connection will be busy and locked; set load-balance to false
2279-
OpenConnectionArgs connArgs = new OpenConnectionArgs(this.connArgs);
2280-
Map<String, String> props = connArgs.getProperties();
2281-
if (props == null) {
2282-
props = new HashMap<>(1);
2283-
connArgs.setProperties(props);
2284-
}
2285-
props.put(ClientAttribute.LOAD_BALANCE, "false");
2283+
OpenConnectionArgs connArgs = new OpenConnectionArgs(this.connArgs,
2284+
this.connectionProps);
2285+
connArgs.getProperties().put(ClientAttribute.LOAD_BALANCE, "false");
22862286
ClientService service = new ClientService(source.hostAddr, connArgs);
22872287
try {
22882288
if (stmtId == snappydataConstants.INVALID_ID) {

gemfirexd/core/build.gradle

Lines changed: 3 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -205,29 +205,6 @@ task odbcMeta {
205205
}
206206
}
207207

208-
/*
209-
task createClassSizeCatalog {
210-
def internalDir = 'com/pivotal/gemfirexd/internal'
211-
def internalOut = "${sourceSets.main.java.outputDir}/${internalDir}"
212-
213-
// need to re-generate class size catalog if any of the classes below change
214-
inputs.files [ "${internalOut}/iapi/types/DataValueDescriptor.class",
215-
"${internalOut}/impl/services/cache/CachedItem.class",
216-
"${internalOut}/impl/store/raw/data/RecordId.class",
217-
"${internalOut}/iapi/store/raw/ContainerKey.class",
218-
"${internalOut}/iapi/services/cache/SizedCacheable.class" ]
219-
outputs.file "src/main/java/${internalDir}/iapi/services/cache/ClassSizeCatalog.java"
220-
221-
def internalCP = 'com.pivotal.gemfirexd.internal'
222-
javaexec {
223-
main = 'org.apache.derbyBuild.ClassSizeCrawler'
224-
classpath = sourceSets.main.runtimeClasspath
225-
// TODO: SW: incomplete code ...
226-
args = [ "-DWS=${workspace}", "-DclassDir=${out.dir}", "-Dout=${derby.engine.src.dir}/${derby.dir}/iapi/services/cache/ClassSizeCatalog.java", "-Dprefix.1=${internalCP}.iapi.types", '-Dprefix.2=com.pivotal.gemfirexd.internal.impl, com.pivotal.gemfirexd.internal.iapi.types.DataValueDescriptor' ]
227-
}
228-
}
229-
*/
230-
231208
compileJava.dependsOn generatePropertiesFiles
232209

233210
// external javadocs
@@ -248,8 +225,8 @@ javadoc.dependsOn.clear()
248225
shadowJar {
249226
dependsOn odbcMeta, doSplit, jar
250227
zip64 = true
251-
baseName = 'snappydata-store'
252-
classifier = ''
228+
archiveBaseName.set('snappydata-store')
229+
archiveClassifier.set('')
253230

254231
mergeServiceFiles()
255232
}
@@ -258,7 +235,7 @@ archivesBaseName = 'snappydata-store-core'
258235

259236
jar {
260237
dependsOn odbcMeta, doSplit
261-
baseName = 'snappydata-store-core'
238+
archiveBaseName.set('snappydata-store-core')
262239

263240
doLast {
264241
// copy the native JNI library

0 commit comments

Comments
 (0)