AbsaOSS / AbsaOSS/enceladus

define variables in oozie templates with starting and ending char

オープン
#1,033 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る
Menas priority: medium refactoring
主要言語
Scala
スター
33
フォーク
16
PR マージ指標
30日以内にマージされた PR はありません

説明

## Background
Currently, oozie variables for the template are just left bound but not right bound, eg. `$Variable` which then allows matching this even to `$Variable2`. If we make these left and right bound we lose this problem, eg. `${Variable}`

## Feature
Change oozie template variables from `$variable` to `${variable}`

## Proposed Solution [Optional]
1. Replace the strings in template
2. Use a simple function to which we provide a map of keys/values
```scala
def richFormat(string: String, replacement: Map[String, String]): String =
replacement.foldLeft(string)((res, entry) => res.replaceAll(s"\\{${entry._1}\\}", entry._2))
```

コントリビューションガイド

コントリビューションガイドを開く

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。