(nifi) branch main updated: NIFI-12986 Remove depreciation warning from ProcessSession.commit Explain advantage of commitAsync in ProcessSession

2024-04-22 Thread joewitt
This is an automated email from the ASF dual-hosted git repository.

joewitt pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/nifi.git


The following commit(s) were added to refs/heads/main by this push:
 new 49862d5342 NIFI-12986 Remove depreciation warning from 
ProcessSession.commit Explain advantage of commitAsync in ProcessSession
49862d5342 is described below

commit 49862d5342f5641f49ff1c2493259dd9628d92c2
Author: Lucas <1115+endzeitbeg...@users.noreply.github.com>
AuthorDate: Mon Apr 22 20:14:09 2024 +0300

NIFI-12986 Remove depreciation warning from ProcessSession.commit
Explain advantage of commitAsync in ProcessSession

This closes #8683

Signed-off-by: Joseph Witt 
---
 .../src/main/java/org/apache/nifi/processor/ProcessSession.java| 7 ---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git 
a/nifi-api/src/main/java/org/apache/nifi/processor/ProcessSession.java 
b/nifi-api/src/main/java/org/apache/nifi/processor/ProcessSession.java
index ecbb9a4019..b3a33dcb3f 100644
--- a/nifi-api/src/main/java/org/apache/nifi/processor/ProcessSession.java
+++ b/nifi-api/src/main/java/org/apache/nifi/processor/ProcessSession.java
@@ -75,10 +75,11 @@ public interface ProcessSession {
  * All FlowFiles operated on within this session must be accounted for by 
transfer or removal or the commit will fail.
  * 
  * As soon as the commit completes the session is again ready to be used.
+ * 
+ * See {@link #commitAsync()}, {@link #commitAsync(Runnable)}, and {@link 
#commitAsync(Runnable, Consumer)}.
+ * The asynchronous session commit methods are preferable to this commit 
call for most cases
+ * as it defers when the actual commit happens to the framework so that it 
can optimize when the commit call takes place.
  *
- * @deprecated As of NiFi 1.14.0, replaced by {@link #commitAsync()}, 
{@link #commitAsync(Runnable)}, and {@link #commitAsync(Runnable, Consumer)}.
- *  The synchronous API is less suited for execution in 
different runtimes, e.g. MiNiFi or Stateless NiFi,
- *  and may cause the dataflow in such runtimes to get stuck.
  * @throws IllegalStateException if detected that this method is being 
called from within a read or write callback
  *  (see {@link #read(FlowFile, InputStreamCallback)}, {@link 
#write(FlowFile, StreamCallback)},
  *  {@link #write(FlowFile, OutputStreamCallback)}) or while a 
read or write stream is open



(nifi) branch main updated: NIFI-13085: (#8687)

2024-04-22 Thread scottyaslan
This is an automated email from the ASF dual-hosted git repository.

scottyaslan pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/nifi.git


The following commit(s) were added to refs/heads/main by this push:
 new 7c5e6b9e14 NIFI-13085: (#8687)
7c5e6b9e14 is described below

commit 7c5e6b9e14c8ffef1dc2a2e24a5f2893737a6506
Author: Matt Gilman 
AuthorDate: Mon Apr 22 18:24:12 2024 -0400

NIFI-13085: (#8687)

- When viewing content, defaulting the Mode to 'Formatted'.

This closes #8687
---
 .../src/main/nifi/src/app/pages/provenance/service/provenance.service.ts | 1 +
 .../src/main/nifi/src/app/pages/queue/service/queue.service.ts   | 1 +
 .../nifi-web-ui/src/main/webapp/js/nf/canvas/nf-queue-listing.js | 1 +
 .../nifi-web-ui/src/main/webapp/js/nf/provenance/nf-provenance-table.js  | 1 +
 4 files changed, 4 insertions(+)

diff --git 
a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-frontend/src/main/nifi/src/app/pages/provenance/service/provenance.service.ts
 
b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-frontend/src/main/nifi/src/app/pages/provenance/service/provenance.service.ts
index 376e740598..7e7627c2ef 100644
--- 
a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-frontend/src/main/nifi/src/app/pages/provenance/service/provenance.service.ts
+++ 
b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-frontend/src/main/nifi/src/app/pages/provenance/service/provenance.service.ts
@@ -118,6 +118,7 @@ export class ProvenanceService {
 }
 
 const contentViewerParameters: any = {
+mode: 'Formatted',
 ref: dataUri
 };
 
diff --git 
a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-frontend/src/main/nifi/src/app/pages/queue/service/queue.service.ts
 
b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-frontend/src/main/nifi/src/app/pages/queue/service/queue.service.ts
index 5c74bce011..116f29a8ce 100644
--- 
a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-frontend/src/main/nifi/src/app/pages/queue/service/queue.service.ts
+++ 
b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-frontend/src/main/nifi/src/app/pages/queue/service/queue.service.ts
@@ -108,6 +108,7 @@ export class QueueService {
 }
 
 const contentViewerParameters: any = {
+mode: 'Formatted',
 ref: dataUri
 };
 
diff --git 
a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-queue-listing.js
 
b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-queue-listing.js
index 135463ff46..433424e465 100644
--- 
a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-queue-listing.js
+++ 
b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-queue-listing.js
@@ -296,6 +296,7 @@
 }
 
 var contentViewerParameters = {
+'mode': 'Formatted',
 'ref': dataUri
 };
 
diff --git 
a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/provenance/nf-provenance-table.js
 
b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/provenance/nf-provenance-table.js
index 1b526fda82..21ea474a92 100644
--- 
a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/provenance/nf-provenance-table.js
+++ 
b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/provenance/nf-provenance-table.js
@@ -144,6 +144,7 @@
 }
 
 var contentViewerParameters = {
+'mode': 'Formatted',
 'ref': dataUri
 };
 



(nifi) branch main updated: NIFI-13081: Adding support to edit a label (#8681)

2024-04-22 Thread scottyaslan
This is an automated email from the ASF dual-hosted git repository.

scottyaslan pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/nifi.git


The following commit(s) were added to refs/heads/main by this push:
 new 830b7443d5 NIFI-13081: Adding support to edit a label (#8681)
830b7443d5 is described below

commit 830b7443d5f311413658b0453a80db4bff92d918
Author: Matt Gilman 
AuthorDate: Mon Apr 22 16:05:28 2024 -0400

NIFI-13081: Adding support to edit a label (#8681)

* NIFI-13081:
- Adding support to edit a label.

* NIFI-13081:
- Fixing lint issues.

This closes #8681
---
 .../service/canvas-context-menu.service.ts |   2 +-
 .../pages/flow-designer/state/flow/flow.actions.ts |   5 +
 .../pages/flow-designer/state/flow/flow.effects.ts |  35 +++
 .../label/edit-label/edit-label.component.html |  58 +++
 .../label/edit-label/edit-label.component.scss |  26 +
 .../label/edit-label/edit-label.component.spec.ts  |  93 +
 .../items/label/edit-label/edit-label.component.ts | 116 +
 7 files changed, 334 insertions(+), 1 deletion(-)

diff --git 
a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-frontend/src/main/nifi/src/app/pages/flow-designer/service/canvas-context-menu.service.ts
 
b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-frontend/src/main/nifi/src/app/pages/flow-designer/service/canvas-context-menu.service.ts
index 418f9ae54f..8e6ec08eee 100644
--- 
a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-frontend/src/main/nifi/src/app/pages/flow-designer/service/canvas-context-menu.service.ts
+++ 
b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-frontend/src/main/nifi/src/app/pages/flow-designer/service/canvas-context-menu.service.ts
@@ -1213,7 +1213,7 @@ export class CanvasContextMenu implements 
ContextMenuDefinitionProvider {
 },
 {
 condition: (selection: d3.Selection) => {
-return this.canvasUtils.isDisconnected(selection);
+return this.canvasUtils.isDisconnected(selection) && 
this.canvasUtils.canModify(selection);
 },
 clazz: 'fa icon-group',
 text: 'Group',
diff --git 
a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-frontend/src/main/nifi/src/app/pages/flow-designer/state/flow/flow.actions.ts
 
b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-frontend/src/main/nifi/src/app/pages/flow-designer/state/flow/flow.actions.ts
index 5f2c30ae9f..c00c48bc3f 100644
--- 
a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-frontend/src/main/nifi/src/app/pages/flow-designer/state/flow/flow.actions.ts
+++ 
b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-frontend/src/main/nifi/src/app/pages/flow-designer/state/flow/flow.actions.ts
@@ -426,6 +426,11 @@ export const openEditRemoteProcessGroupDialog = 
createAction(
 props<{ request: EditComponentDialogRequest }>()
 );
 
+export const openEditLabelDialog = createAction(
+`${CANVAS_PREFIX} Open Edit Label Dialog`,
+props<{ request: EditComponentDialogRequest }>()
+);
+
 export const navigateToManageRemotePorts = createAction(
 `${CANVAS_PREFIX} Open Remote Process Group Manage Remote Ports`,
 props<{ request: RpgManageRemotePortsRequest }>()
diff --git 
a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-frontend/src/main/nifi/src/app/pages/flow-designer/state/flow/flow.effects.ts
 
b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-frontend/src/main/nifi/src/app/pages/flow-designer/state/flow/flow.effects.ts
index eb92454cd2..d5f9d96b55 100644
--- 
a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-frontend/src/main/nifi/src/app/pages/flow-designer/state/flow/flow.effects.ts
+++ 
b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-frontend/src/main/nifi/src/app/pages/flow-designer/state/flow/flow.effects.ts
@@ -129,6 +129,7 @@ import { ExtensionTypesService } from 
'../../../../service/extension-types.servi
 import { ChangeComponentVersionDialog } from 
'../../../../ui/common/change-component-version-dialog/change-component-version-dialog';
 import { SnippetService } from '../../service/snippet.service';
 import { selectTransform } from '../transform/transform.selectors';
+import { EditLabel } from 
'../../ui/canvas/items/label/edit-label/edit-label.component';
 
 @Injectable()
 export class FlowEffects {
@@ -1053,6 +1054,8 @@ export class FlowEffects {
 case ComponentType.InputPort:
 case ComponentType.OutputPort:
 return of(FlowActions.openEditPortDialog({ request }));
+case ComponentType.Label:
+

(nifi) branch main updated: NIFI-13083: (#8684)

2024-04-22 Thread scottyaslan
This is an automated email from the ASF dual-hosted git repository.

scottyaslan pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/nifi.git


The following commit(s) were added to refs/heads/main by this push:
 new 72a3529718 NIFI-13083: (#8684)
72a3529718 is described below

commit 72a3529718118d0a90070b53250d8bfae76598d8
Author: Matt Gilman 
AuthorDate: Mon Apr 22 15:39:02 2024 -0400

NIFI-13083: (#8684)

- Fixing import preventing the dialog from warning the user that they must 
apply changes before deleting/adding the same parameter with different 
sensitivities.
- Allowing the sensitivity to change when deleting/adding the same 
parameter as long as it hasn't been saved yet.
- Adding the Parameters context menu item for Process Groups.
---
 .../service/canvas-context-menu.service.ts | 28 +++
 .../flow-designer/service/canvas-utils.service.ts  | 41 +-
 .../pages/flow-designer/state/flow/flow.actions.ts |  6 
 .../pages/flow-designer/state/flow/flow.effects.ts | 12 +++
 .../app/pages/flow-designer/state/flow/index.ts|  4 +++
 .../parameter-table/parameter-table.component.ts   |  7 ++--
 6 files changed, 89 insertions(+), 9 deletions(-)

diff --git 
a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-frontend/src/main/nifi/src/app/pages/flow-designer/service/canvas-context-menu.service.ts
 
b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-frontend/src/main/nifi/src/app/pages/flow-designer/service/canvas-context-menu.service.ts
index 9685477e21..418f9ae54f 100644
--- 
a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-frontend/src/main/nifi/src/app/pages/flow-designer/service/canvas-context-menu.service.ts
+++ 
b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-frontend/src/main/nifi/src/app/pages/flow-designer/service/canvas-context-menu.service.ts
@@ -57,7 +57,8 @@ import {
 stopVersionControlRequest,
 copy,
 paste,
-terminateThreads
+terminateThreads,
+navigateToParameterContext
 } from '../state/flow/flow.actions';
 import { ComponentType } from '../../../state/shared';
 import {
@@ -504,14 +505,29 @@ export class CanvasContextMenu implements 
ContextMenuDefinitionProvider {
 }
 },
 {
-condition: (selection: any) => {
-// TODO - hasParameterContext
-return false;
+condition: (selection: d3.Selection) => {
+return this.canvasUtils.hasParameterContext(selection);
 },
 clazz: 'fa',
 text: 'Parameters',
-action: () => {
-// TODO - open parameter context
+action: (selection: d3.Selection) => {
+let id;
+if (selection.empty()) {
+id = this.canvasUtils.getParameterContextId();
+} else {
+const selectionData = selection.datum();
+id = selectionData.parameterContext.id;
+}
+
+if (id) {
+this.store.dispatch(
+navigateToParameterContext({
+request: {
+id
+}
+})
+);
+}
 }
 },
 {
diff --git 
a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-frontend/src/main/nifi/src/app/pages/flow-designer/service/canvas-utils.service.ts
 
b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-frontend/src/main/nifi/src/app/pages/flow-designer/service/canvas-utils.service.ts
index afbc4d2940..d8d2320f51 100644
--- 
a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-frontend/src/main/nifi/src/app/pages/flow-designer/service/canvas-utils.service.ts
+++ 
b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-frontend/src/main/nifi/src/app/pages/flow-designer/service/canvas-utils.service.ts
@@ -25,6 +25,7 @@ import {
 selectCanvasPermissions,
 selectConnections,
 selectCopiedSnippet,
+selectCurrentParameterContext,
 selectCurrentProcessGroupId,
 selectParentProcessGroupId
 } from '../state/flow/flow.selectors';
@@ -32,7 +33,7 @@ import { initialState as initialFlowState } from 
'../state/flow/flow.reducer';
 import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
 import { BulletinsTip } from 
'../../../ui/common/tooltips/bulletins-tip/bulletins-tip.component';
 import { BreadcrumbEntity, Position } from '../state/shared';
-import { ComponentType, Permissions } from '../../../state/shared';
+import { ComponentType, 

(nifi) branch main updated: NIFI-13074: Resetting the transform when navigating from the lineage to the event listing (#8678)

2024-04-22 Thread scottyaslan
This is an automated email from the ASF dual-hosted git repository.

scottyaslan pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/nifi.git


The following commit(s) were added to refs/heads/main by this push:
 new 90506823e1 NIFI-13074: Resetting the transform when navigating from 
the lineage to the event listing (#8678)
90506823e1 is described below

commit 90506823e1848b41e800ea9330fdd99016f85d36
Author: Matt Gilman 
AuthorDate: Mon Apr 22 14:15:46 2024 -0400

NIFI-13074: Resetting the transform when navigating from the lineage to the 
event listing (#8678)

* NIFI-13074:
- Resetting the transform when navigating from the lineage to the event 
listing.

* NIFI-13074:
- Fixing lint issues.

This closes #8678
---
 .../lineage/lineage.component.ts   | 23 --
 1 file changed, 17 insertions(+), 6 deletions(-)

diff --git 
a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-frontend/src/main/nifi/src/app/pages/provenance/ui/provenance-event-listing/provenance-event-table/lineage/lineage.component.ts
 
b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-frontend/src/main/nifi/src/app/pages/provenance/ui/provenance-event-listing/provenance-event-table/lineage/lineage.component.ts
index f2b5117d27..b49af4d647 100644
--- 
a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-frontend/src/main/nifi/src/app/pages/provenance/ui/provenance-event-listing/provenance-event-table/lineage/lineage.component.ts
+++ 
b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-frontend/src/main/nifi/src/app/pages/provenance/ui/provenance-event-listing/provenance-event-table/lineage/lineage.component.ts
@@ -28,6 +28,7 @@ import {
 ContextMenuItemDefinition
 } from '../../../../../../ui/common/context-menu/context-menu.component';
 import { CdkContextMenuTrigger } from '@angular/cdk/menu';
+import { ZoomBehavior } from 'd3';
 
 @Component({
 selector: 'lineage',
@@ -93,6 +94,7 @@ export class LineageComponent implements OnInit {
 
 @Input() set reset(reset: EventEmitter) {
 reset.pipe(takeUntilDestroyed(this.destroyRef)).subscribe(() => {
+// clear the current lineage graph
 this.nodeLookup.clear();
 this.linkLookup.clear();
 
@@ -108,6 +110,11 @@ export class LineageComponent implements OnInit {
 
 nodes.exit().remove();
 links.exit().remove();
+
+// reset the transform for the next lineage graph
+if (this.svg && this.lineageZoom) {
+this.svg.call(this.lineageZoom.transform, d3.zoomIdentity);
+}
 });
 }
 
@@ -226,6 +233,8 @@ export class LineageComponent implements OnInit {
 lineageContainerElement: any;
 lineageContextmenu: ContextMenuDefinitionProvider;
 
+private lineageZoom: ZoomBehavior | undefined;
+private svg: d3.Selection | undefined;
 private nodeLookup: Map = new Map();
 private linkLookup: Map = new Map();
 private previousEventTimestampThreshold = -1;
@@ -262,7 +271,7 @@ export class LineageComponent implements OnInit {
 this.lineageElement = document.getElementById('lineage');
 
 // handle zoom behavior
-const lineageZoom: any = d3
+this.lineageZoom = d3
 .zoom()
 .scaleExtent([0.2, 8])
 .on('zoom', function (event) {
@@ -272,15 +281,16 @@ export class LineageComponent implements OnInit {
 });
 
 // build the birdseye svg
-const svg = d3
+this.svg = d3
 .select(this.lineageElement)
 .append('svg')
 .attr('width', '100%')
 .attr('height', '100%')
-.call(lineageZoom)
+.call(this.lineageZoom)
 .on('dblclick.zoom', null);
 
-svg.append('rect')
+this.svg
+.append('rect')
 .attr('class', 'lineage')
 .attr('width', '100%')
 .attr('height', '100%')
@@ -292,7 +302,8 @@ export class LineageComponent implements OnInit {
 event.preventDefault();
 });
 
-svg.append('defs')
+this.svg
+.append('defs')
 .selectAll('marker')
 .data(['FLOWFILE', 'FLOWFILE-SELECTED', 'EVENT', 'EVENT-SELECTED'])
 .enter()
@@ -323,7 +334,7 @@ export class LineageComponent implements OnInit {
 .attr('d', 'M0,-3 L6,0 L0,3');
 
 // group everything together
-this.lineageContainerElement = svg
+this.lineageContainerElement = this.svg
 .append('g')
 .attr('transform', 'translate(0, 0) scale(1)')
 .attr('pointer-events', 'all')



(nifi) branch main updated (31e1ce8f4c -> 2af2a3956e)

2024-04-22 Thread scottyaslan
This is an automated email from the ASF dual-hosted git repository.

scottyaslan pushed a change to branch main
in repository https://gitbox.apache.org/repos/asf/nifi.git


from 31e1ce8f4c NIFI-13076: reduce enum array allocation (#8679)
 add 2af2a3956e NIFI-13054: (#8676)

No new revisions were added by this update.

Summary of changes:
 .../el-function-tip/el-function-tip.component.html|  2 +-
 .../el-function-tip/el-function-tip.component.scss|  3 +++
 .../tooltips/el-function-tip/el-function-tip.component.ts |  2 ++
 .../tooltips/parameter-tip/parameter-tip.component.html   |  4 +++-
 .../tooltips/parameter-tip/parameter-tip.component.scss   | 15 ++-
 .../tooltips/parameter-tip/parameter-tip.component.ts |  2 ++
 6 files changed, 21 insertions(+), 7 deletions(-)



(nifi) branch main updated: NIFI-13076: reduce enum array allocation (#8679)

2024-04-22 Thread markap14
This is an automated email from the ASF dual-hosted git repository.

markap14 pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/nifi.git


The following commit(s) were added to refs/heads/main by this push:
 new 31e1ce8f4c NIFI-13076: reduce enum array allocation (#8679)
31e1ce8f4c is described below

commit 31e1ce8f4cec10e291adeb31116194e6f445b751
Author: sullis 
AuthorDate: Mon Apr 22 10:17:15 2024 -0500

NIFI-13076: reduce enum array allocation (#8679)
---
 .../processors/opentelemetry/server/HttpRequestHandler.java| 10 +++---
 1 file changed, 7 insertions(+), 3 deletions(-)

diff --git 
a/nifi-nar-bundles/nifi-opentelemetry-bundle/nifi-opentelemetry-processors/src/main/java/org/apache/nifi/processors/opentelemetry/server/HttpRequestHandler.java
 
b/nifi-nar-bundles/nifi-opentelemetry-bundle/nifi-opentelemetry-processors/src/main/java/org/apache/nifi/processors/opentelemetry/server/HttpRequestHandler.java
index ef0efd3bc2..740df36af3 100644
--- 
a/nifi-nar-bundles/nifi-opentelemetry-bundle/nifi-opentelemetry-processors/src/main/java/org/apache/nifi/processors/opentelemetry/server/HttpRequestHandler.java
+++ 
b/nifi-nar-bundles/nifi-opentelemetry-bundle/nifi-opentelemetry-processors/src/main/java/org/apache/nifi/processors/opentelemetry/server/HttpRequestHandler.java
@@ -55,6 +55,10 @@ import java.util.Objects;
  * HTTP Handler for OTLP Export Service Requests over gGRPC or encoded as JSON 
or Protobuf over HTTP
  */
 public class HttpRequestHandler extends 
SimpleChannelInboundHandler {
+private static final TelemetryContentEncoding[] 
TELEMETRY_CONTENT_ENCODING_VALUES = TelemetryContentEncoding.values();
+private static final TelemetryRequestType[] TELEMETRY_REQUEST_TYPE_VALUES 
= TelemetryRequestType.values();
+private static final TelemetryContentType[] TELEMETRY_CONTENT_TYPE_VALUES 
= TelemetryContentType.values();
+
 private final ResponseBodyWriter responseBodyWriter = new 
StandardResponseBodyWriter();
 
 private final ComponentLog log;
@@ -138,7 +142,7 @@ public class HttpRequestHandler extends 
SimpleChannelInboundHandler