Repository: hashgraph/hedera-services
Issue: Account Balances exportPeriod doesn't control export timing

**Summary of the defect**
The export frequency doesn't follow the control of `balances.exportPeriodSecs` property. The example here is the EET client updates this property to be 120 seconds. However, it still exports account balances based on previous value.

From the output.log, we can see this behavior:

```
  balances.exportDir.path=/opt/hgcapp/accountBalances/
  balances.exportEnabled=true
  balances.exportPeriodSecs=600
  balances.exportTokenBalances=true
  hedera.accountsExportPath=data/onboard/exportedAccount.txt
  hedera.exportAccountsOnStartup=false
  balances.exportDir.path=data/accountBalances/
  balances.exportPeriodSecs=60
  balances.exportDir.path=data/accountBalances/
  balances.exportPeriodSecs=60
2021-04-28 01:46:39.608 INFO  167  ServicesMain - Accounts exported.
  balances.exportDir.path=data/accountBalances/
  balances.exportPeriodSecs=120
2021-04-28 01:48:00.816 INFO  142  SignedStateBalancesExporter - Took 95ms to summarize signed state balances
2021-04-28 01:48:00.849 INFO  179  SignedStateBalancesExporter -  -> Took 32ms to export and sign proto balances file at 2021-04-28T01:48:00.145707Z
2021-04-28 01:48:00.950 INFO  164  SignedStateBalancesExporter -  -> Took 101ms to export and sign CSV balances file at 2021-04-28T01:48:00.145707Z
2021-04-28 01:49:00.972 INFO  142  SignedStateBalancesExporter - Took 338ms to summarize signed state balances
2021-04-28 01:49:01.059 INFO  179  SignedStateBalancesExporter -  -> Took 86ms to export and sign proto balances file at 2021-04-28T01:49:00.077185Z
2021-04-28 01:49:01.567 INFO  164  SignedStateBalancesExporter -  -> Took 507ms to export and sign CSV balances file at 2021-04-28T01:49:00.077185Z
2021-04-28 01:50:01.057 INFO  142  SignedStateBalancesExporter - Took 597ms to summarize signed state balances
2021-04-28 01:50:01.172 INFO  179  SignedStateBalancesExporter -  -> Took 114ms to export and sign proto balances file at 2021-04-28T01:50:00.028142Z
2021-04-28 01:50:01.759 INFO  164  SignedStateBalancesExporter -  -> Took 585ms to export and sign CSV balances file at 2021-04-28T01:50:00.028142Z
2021-04-28 01:51:00.877 INFO  142  SignedStateBalancesExporter - Took 334ms to summarize signed state balances
2021-04-28 01:51:00.981 INFO  179  SignedStateBalancesExporter -  -> Took 102ms to export and sign proto balances file at 2021-04-28T01:51:00.044377Z
2021-04-28 01:51:01.591 INFO  164  SignedStateBalancesExporter -  -> Took 610ms to export and sign CSV balances file at 2021-04-28T01:51:00.044377Z
2021-04-28 01:52:01.168 INFO  142  SignedStateBalancesExporter - Took 497ms to summarize signed state balances
2021-04-28 01:52:01.274 INFO  179  SignedStateBalancesExporter -  -> Took 105ms to export and sign proto balances file at 2021-04-28T01:52:00.082098Z
2021-04-28 01:52:02.038 INFO  164  SignedStateBalancesExporter -  -> Took 763ms to export and sign CSV balances file at 2021-04-28T01:52:00.082098Z
2021-04-28 01:53:01.213 INFO  142  SignedStateBalancesExporter - Took 668ms to summarize signed state balances
2021-04-28 01:53:01.317 INFO  179  SignedStateBalancesExporter -  -> Took 103ms to export and sign proto balances file at 2021-04-28T01:53:00.065053Z
2021-04-28 01:53:01.899 INFO  164  SignedStateBalancesExporter -  -> Took 581ms to export and sign CSV balances file at 2021-04-28T01:53:00.065053Z
2021-04-28 01:54:01.250 INFO  142  SignedStateBalancesExporter - Took 628ms to summarize signed state balances
2021-04-28 01:54:01.359 INFO  179  SignedStateBalancesExporter -  -> Took 108ms to export and sign proto balances file at 2021-04-28T01:54:00.102884Z
2021-04-28 01:54:01.990 INFO  164  SignedStateBalancesExporter -  -> Took 630ms to export and sign CSV balances file at 2021-04-28T01:54:00.102884Z
2021-04-28 01:55:01.283 INFO  142  SignedStateBalancesExporter - Took 641ms to summarize signed state balances
2021-04-28 01:55:01.384 INFO  179  SignedStateBalancesExporter -  -> Took 100ms to export and sign proto balances file at 2021-04-28T01:55:00.177061Z
2021-04-28 01:55:01.956 INFO  164  SignedStateBalancesExporter -  -> Took 571ms to export and sign CSV balances file at 2021-04-28T01:55:00.177061Z
2021-04-28 01:56:00.832 INFO  142  SignedStateBalancesExporter - Took 353ms to summarize signed state balances
2021-04-28 01:56:00.933 INFO  179  SignedStateBalancesExporter -  -> Took 100ms to export and sign proto balances file at 2021-04-28T01:56:00.096215Z
2021-04-28 01:56:01.515 INFO  164  SignedStateBalancesExporter -  -> Took 581ms to export and sign CSV balances file at 2021-04-28T01:56:00.096215Z

```

**How to reproduce (if possible)**

Follow the slack report link: https://hedera-hashgraph.slack.com/archives/CKWHL8R9A/p1619575144055800 into the test results and get into the node0000's output.log and also the exported account balances files to find the details.

**Service logs (if applicable)**
```
...
```
**Environment:**
- OS: [e.g. Ubuntu 18.04]
- Java: [e.g. OpenJDK 11.0.4]
- Hedera Services Version: [e.g. 0.0.5]
- HAPI Version: [e.g. 0.0.5]

**Additional Context**
Add any other context about the problem here. Attach any logs here, if applicable.


Changed files:
hedera-node/src/main/java/com/hedera/services/state/exports/SignedStateBalancesExporter.java

diff --git a/hedera-node/src/main/java/com/hedera/services/state/exports/SignedStateBalancesExporter.java b/hedera-node/src/main/java/com/hedera/services/state/exports/SignedStateBalancesExporter.java
index 7a6ad5e425..d4bf0ea547 100644
--- a/hedera-node/src/main/java/com/hedera/services/state/exports/SignedStateBalancesExporter.java
+++ b/hedera-node/src/main/java/com/hedera/services/state/exports/SignedStateBalancesExporter.java
@@ -96,7 +96,6 @@ public class SignedStateBalancesExporter implements BalancesExporter {
 	private BalancesSummary summary;
 
 	Instant periodBegin = NEVER;
-	private final int exportPeriod;
 
 	static final Comparator<SingleAccountBalances> SINGLE_ACCOUNT_BALANCES_COMPARATOR =
 			Comparator.comparing(SingleAccountBalances::getAccountID, ACCOUNT_ID_COMPARATOR);
@@ -109,12 +108,13 @@ public class SignedStateBalancesExporter implements BalancesExporter {
 		this.signer = signer;
 		this.expectedFloat = properties.getLongProperty("ledger.totalTinyBarFloat");
 		this.dynamicProperties = dynamicProperties;
-		exportPeriod = dynamicProperties.balancesExportPeriodSecs();
 	}
 
 	@Override
 	public boolean isTimeToExport(Instant now) {
-		if ( periodBegin != NEVER && now.getEpochSecond() % exportPeriod <= ALLOWED_EXPORT_TIME_SKEW
+		final int exportPeriod = dynamicProperties.balancesExportPeriodSecs();
+		if ( periodBegin != NEVER
+				&& now.getEpochSecond() % exportPeriod <= ALLOWED_EXPORT_TIME_SKEW
 				&& now.getEpochSecond() / exportPeriod != periodBegin.getEpochSecond() / exportPeriod) {
 			periodBegin = now;
 			return true;