[
https://issues.apache.org/jira/browse/NIFI-8669?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17361576#comment-17361576
]
Arun Prakash commented on NIFI-8669:
------------------------------------
One way to _hack_ this issue currently is using the
_X-Cluster-Id-Generation-Seed_ header key as follows:
{code:java}
curl --location --request POST
'http://localhost:9091/nifi-api/process-groups/58d527f9-0178-1000-21a9-cf75fa6606c0/process-groups'
\
--header 'X-Cluster-Id-Generation-Seed: arun' \
--header 'Content-Type: application/json' \
--data-raw '{
"revision": {
"version": 0
},
"component": {
"name": "test"
}
}'
{code}
This will force the {{ApplicationResource#generateId }}method's{{ }}line *210*
to throw an error.
{code:java}
try {
UUID seedId = UUID.fromString(seed.get());
uuid = new UUID(seedId.getMostSignificantBits(),
seed.get().hashCode());
} catch (Exception e) {
logger.warn("Provided 'seed' does not represent UUID. Will not
be able to extract most significant bits for ID generation.");
uuid =
UUID.nameUUIDFromBytes(seed.get().getBytes(StandardCharsets.UTF_8));
}
{code}
which will then allow the fallback solution of generating the *UUID* with the
built in _nameUUIDFromBytes_ resulting in a VALID value_._
> Invalid UUIDs generated
> -----------------------
>
> Key: NIFI-8669
> URL: https://issues.apache.org/jira/browse/NIFI-8669
> Project: Apache NiFi
> Issue Type: Bug
> Components: Core Framework
> Affects Versions: 1.13.2
> Reporter: Arun Prakash
> Priority: Major
> Original Estimate: 24h
> Remaining Estimate: 24h
>
> The UUIDs generated (type 3) are not fully compliant to the RFC.
> For instance:
> {code:java}
> 9adabada-3b4b-32eb-fd7e-c41191eefa2a
> 642ff728-2fb3-3e6b-f48f-0cfb94b772e2 {code}
> {{generated by NiFi as _id_ for components are based on type 3. For type 3,
> 4, and 5, the *UUID variant* has to be one of (8, 9, a, b)}}
> *Example A:*
> 9adabada-3b4b-*3*2eb-*f*d7e-c41191eefa2a
> This is a *uuid v3*, and variant character is *{{f}}*, and *{{f}}* is not a
> valid uuid variant (just 8, 9, a and b are valid). *NOT VALID*
--
This message was sent by Atlassian Jira
(v8.3.4#803005)