You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@nifi.apache.org by Nicholas Hughes <ni...@gmail.com> on 2017/04/05 16:04:51 UTC

Flow XML Archive Filename

On 0.7.x versions, can anyone tell me how the numeric prefix for flow
backups is generated?

Example: 8548619576826734-flow.xml.gz

I apologize for the "read the code" question, but GitHub won't let me
search anything other than master from the website and I'm not in a
position to pull down the code to grep right now.

I appreciate the assistance.

-Nick

Re: Flow XML Archive Filename

Posted by Nicholas Hughes <ni...@gmail.com>.
Thanks Joe!

-Nick


On Wed, Apr 5, 2017 at 2:08 PM, Joe Witt <jo...@gmail.com> wrote:

> Got ya.  Here is the old way it was done [1].
>
>
>                 final Path archiveFile =
> archiveDir.resolve(System.nanoTime() + "-" +
> configFile.toFile().getName());
>
>
> [1]  https://github.com/apache/nifi/blob/5625686ea4abdd38cc168607157ac3
> 4622e7b105/nifi-nar-bundles/nifi-framework-bundle/nifi-
> framework/nifi-framework-core/src/main/java/org/apache/nifi/persistence/
> StandardXMLFlowConfigurationDAO.java#L141-L158
>
> Thanks
> Joe
>
> On Wed, Apr 5, 2017 at 12:53 PM, Nicholas Hughes
> <ni...@gmail.com> wrote:
> > Joe,
> >
> > Thanks for the reply. I did find that code in my search, but it seems to
> be
> > the "new" 1.x method of archive file naming. The new method is a lot
> easier
> > to eyeball and see that it's concatenating date/time values.
> >
> > Example: 20170405T164814+0000_flow.xml.gz
> >
> > Unfortunately, I'm looking for the "old" 0.x file naming... which seems
> to
> > be some long integer calculation of time.
> >
> > Example: 8548619576826734-flow.xml.gz
> >
> > -Nick
> >
> >
> > On Wed, Apr 5, 2017 at 12:32 PM, Joe Witt <jo...@gmail.com> wrote:
> >
> >> Nick,
> >>
> >> The details for that can be found here [1].  It isn't exactly meant to
> >> be a public interface in terms of the naming being reliable thought so
> >> take care to rely on it programatically.
> >>
> >> [1] https://github.com/apache/nifi/blob/30889995cb6001864dd5007b12c70a
> >> c9948907da/nifi-nar-bundles/nifi-framework-bundle/nifi-
> >> framework/nifi-framework-core/src/main/java/org/apache/nifi/
> persistence/
> >> FlowConfigurationArchiveManager.java
> >>
> >> Thanks
> >> Joe
> >>
> >> On Wed, Apr 5, 2017 at 12:04 PM, Nicholas Hughes
> >> <ni...@gmail.com> wrote:
> >> > On 0.7.x versions, can anyone tell me how the numeric prefix for flow
> >> > backups is generated?
> >> >
> >> > Example: 8548619576826734-flow.xml.gz
> >> >
> >> > I apologize for the "read the code" question, but GitHub won't let me
> >> > search anything other than master from the website and I'm not in a
> >> > position to pull down the code to grep right now.
> >> >
> >> > I appreciate the assistance.
> >> >
> >> > -Nick
> >>
>

Re: Flow XML Archive Filename

Posted by Joe Witt <jo...@gmail.com>.
Got ya.  Here is the old way it was done [1].


                final Path archiveFile =
archiveDir.resolve(System.nanoTime() + "-" +
configFile.toFile().getName());


[1]  https://github.com/apache/nifi/blob/5625686ea4abdd38cc168607157ac34622e7b105/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/main/java/org/apache/nifi/persistence/StandardXMLFlowConfigurationDAO.java#L141-L158

Thanks
Joe

On Wed, Apr 5, 2017 at 12:53 PM, Nicholas Hughes
<ni...@gmail.com> wrote:
> Joe,
>
> Thanks for the reply. I did find that code in my search, but it seems to be
> the "new" 1.x method of archive file naming. The new method is a lot easier
> to eyeball and see that it's concatenating date/time values.
>
> Example: 20170405T164814+0000_flow.xml.gz
>
> Unfortunately, I'm looking for the "old" 0.x file naming... which seems to
> be some long integer calculation of time.
>
> Example: 8548619576826734-flow.xml.gz
>
> -Nick
>
>
> On Wed, Apr 5, 2017 at 12:32 PM, Joe Witt <jo...@gmail.com> wrote:
>
>> Nick,
>>
>> The details for that can be found here [1].  It isn't exactly meant to
>> be a public interface in terms of the naming being reliable thought so
>> take care to rely on it programatically.
>>
>> [1] https://github.com/apache/nifi/blob/30889995cb6001864dd5007b12c70a
>> c9948907da/nifi-nar-bundles/nifi-framework-bundle/nifi-
>> framework/nifi-framework-core/src/main/java/org/apache/nifi/persistence/
>> FlowConfigurationArchiveManager.java
>>
>> Thanks
>> Joe
>>
>> On Wed, Apr 5, 2017 at 12:04 PM, Nicholas Hughes
>> <ni...@gmail.com> wrote:
>> > On 0.7.x versions, can anyone tell me how the numeric prefix for flow
>> > backups is generated?
>> >
>> > Example: 8548619576826734-flow.xml.gz
>> >
>> > I apologize for the "read the code" question, but GitHub won't let me
>> > search anything other than master from the website and I'm not in a
>> > position to pull down the code to grep right now.
>> >
>> > I appreciate the assistance.
>> >
>> > -Nick
>>

Re: Flow XML Archive Filename

Posted by Nicholas Hughes <ni...@gmail.com>.
Joe,

Thanks for the reply. I did find that code in my search, but it seems to be
the "new" 1.x method of archive file naming. The new method is a lot easier
to eyeball and see that it's concatenating date/time values.

Example: 20170405T164814+0000_flow.xml.gz

Unfortunately, I'm looking for the "old" 0.x file naming... which seems to
be some long integer calculation of time.

Example: 8548619576826734-flow.xml.gz

-Nick


On Wed, Apr 5, 2017 at 12:32 PM, Joe Witt <jo...@gmail.com> wrote:

> Nick,
>
> The details for that can be found here [1].  It isn't exactly meant to
> be a public interface in terms of the naming being reliable thought so
> take care to rely on it programatically.
>
> [1] https://github.com/apache/nifi/blob/30889995cb6001864dd5007b12c70a
> c9948907da/nifi-nar-bundles/nifi-framework-bundle/nifi-
> framework/nifi-framework-core/src/main/java/org/apache/nifi/persistence/
> FlowConfigurationArchiveManager.java
>
> Thanks
> Joe
>
> On Wed, Apr 5, 2017 at 12:04 PM, Nicholas Hughes
> <ni...@gmail.com> wrote:
> > On 0.7.x versions, can anyone tell me how the numeric prefix for flow
> > backups is generated?
> >
> > Example: 8548619576826734-flow.xml.gz
> >
> > I apologize for the "read the code" question, but GitHub won't let me
> > search anything other than master from the website and I'm not in a
> > position to pull down the code to grep right now.
> >
> > I appreciate the assistance.
> >
> > -Nick
>

Re: Flow XML Archive Filename

Posted by Joe Witt <jo...@gmail.com>.
Nick,

The details for that can be found here [1].  It isn't exactly meant to
be a public interface in terms of the naming being reliable thought so
take care to rely on it programatically.

[1] https://github.com/apache/nifi/blob/30889995cb6001864dd5007b12c70ac9948907da/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/main/java/org/apache/nifi/persistence/FlowConfigurationArchiveManager.java

Thanks
Joe

On Wed, Apr 5, 2017 at 12:04 PM, Nicholas Hughes
<ni...@gmail.com> wrote:
> On 0.7.x versions, can anyone tell me how the numeric prefix for flow
> backups is generated?
>
> Example: 8548619576826734-flow.xml.gz
>
> I apologize for the "read the code" question, but GitHub won't let me
> search anything other than master from the website and I'm not in a
> position to pull down the code to grep right now.
>
> I appreciate the assistance.
>
> -Nick