Skip to content

Commit

Permalink
influxmigration fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
naxan6 committed Sep 28, 2024
1 parent 417a135 commit 2459e1e
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 15 deletions.
34 changes: 20 additions & 14 deletions FKala.Core/Migrations/Influx/InfluxLineParser.cs
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,15 @@ private void ReadTags(IEnumerator<char> ce)
sb.Clear();
continue;
}
if ('\\' == c) //read escaped char instantly
{
//sb.Add(c);
someleft = ce.MoveNext();
c = ce.Current;
sb.Add(c);
someleft = ce.MoveNext();
continue;
}
if (' ' == c)
{
var pair = new string(sb.ToArray()).Trim().Split("=");
Expand All @@ -96,13 +105,7 @@ private void ReadTags(IEnumerator<char> ce)
sb.Clear();
return;
}
if ('\\' == c) //read escaped char instantly
{
sb.Add(c);
someleft = ce.MoveNext();
sb.Add(c);
continue;
}



sb.Add(c);
Expand Down Expand Up @@ -141,6 +144,15 @@ private void ReadFields(IEnumerator<char> ce)
sb.Clear();
continue;
}
if ('\\' == c) //read escaped char instantly
{
//sb.Add(c);
someleft = ce.MoveNext();
c = ce.Current;
sb.Add(c);
someleft = ce.MoveNext();
continue;
}
if (' ' == c)
{
var pair = new string(sb.ToArray()).Trim().Split("=");
Expand All @@ -149,13 +161,7 @@ private void ReadFields(IEnumerator<char> ce)
sb.Clear();
return;
}
if ('\\' == c) //read escaped char instantly
{
sb.Add(c);
someleft = ce.MoveNext();
sb.Add(c);
continue;
}



sb.Add(c);
Expand Down
2 changes: 1 addition & 1 deletion FKala.Core/Migrations/Influx/InfluxLineProtocolImporter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ public void ImportLine(string line)
}
else if (tags.ContainsKey("sensorname"))
{
newMeasurement = tags["sensorname"].Replace(" ", "_");
newMeasurement = measurement + "/" + tags["sensorname"].Replace(" ", "_");
}


Expand Down

0 comments on commit 2459e1e

Please sign in to comment.