Babylonian Talmud: Tractate Sanhedrin
Folio 97A
R. Kattina said: Six thousand years shall the world exist, and one [thousand, the seventh], it shall be desolate, as it is written, And the Lord alone shall be exalted in that day. Abaye said: it will be desolate two [thousand], as it is said, After two days will he revive us: in the third day, he will raise us up, and we shall live in his sight.
It has been taught in accordance with R. Kattina: Just as the seventh year is one year of release in seven, so is the world: one thousand years out of seven shall be fallow, as it is written, And the Lord alone shall be exalted in that day,’ and it is further said, A Psalm and song for the Sabbath day, meaning the day that is altogether Sabbath — 35 and it is also said, For a thousand years in thy sight are but as yesterday when it is past.
The Tanna debe Eliyyahu teaches: The world is to exist six thousand years. In the first two thousand there was desolation; two thousand years the Torah flourished; and the next two thousand years is the Messianic era, but through our many iniquities all these years have been lost.